realbasic-games
[Top] [All Lists]

Re: Time based movement

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Time based movement
From: Asher Dunn <asher at fireyesoftware dot com>
Date: Sun, 26 Dec 2004 17:09:00 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <D84533F8-5139-11D9-B4DD-000A95DB6C90 at fireyesoftware dot com> <B549BB36-56ED-11D9-AEA1-000A95DB6C90 at fireyesoftware dot com> <F1695E43-5748-11D9-AED1-000393B48432 at optonline dot net> <60BC6C1D-5780-11D9-AA63-000A95DB6C90 at fireyesoftware dot com> <6F97444C-5783-11D9-8072-0003933EA538 at chaoticbox dot com> <C9A2B838-5783-11D9-AA63-000A95DB6C90 at fireyesoftware dot com> <22D2CBAE-5788-11D9-8072-0003933EA538 at chaoticbox dot com> <B7A0C878-5788-11D9-AA63-000A95DB6C90 at fireyesoftware dot com>

On Dec 26, 2004, at 4:54 PM, Asher Dunn wrote:

You then add user input to the current velocity,

curTurn = curTurn + turnRate

Make that:
if shouldTurn then curTurn = curTurn + turnRate

subtract anti-momentum/friction (and/or add positive momentum),
and scale the result to the frame delta to get the actual position/orientation for each frame.

ship.yaw(curTurn)

Make that:
ship.yaw(curTurn * dt)

Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software <http://www.fireyesoftware.com/> Make PDFs from your RB app <http://www.fireyesoftware.com/code/pdfclasses/>
AIM and Yahoo: fireye7517
REALbasic 5.5.3 Mac OS X 10.3.5

_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>