On Dec 25, 2004, at 10:24 PM, Asher Dunn wrote:
On Dec 18, 2004, at 4:14 PM, Asher Dunn wrote:
In my game Eclise, the turning code looks like this:
if shouldTurnLeft then
curTurn = curTurn + turnRate
elseif shouldTurnRight
curTurn = curTurn - turnRate
else
curTurn = curTurn - (turnRate * sign(curTurn)) //move curTurn
towards 0
end if
ship.turn(curTurn)
This makes the turning nice and smooth, because you don't move
directly from stopped to full turn.
I want to make this time based, not frame based.
My question is, should it be:
curTurn = curTurn + turnRate * dt
or
ship.turn(curTurn *dt)
or does it not make a difference?
Does no one have an answer to this?
Asher Dunn
If curturn is the ship's heading then it should be:
curturn=curturn+turnrate*dt
THEN
ship.turn(curturn*dt)
============
Daniel R. Lurie
============
http://www.vikingdan.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|