Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Decelleration speed up

Author
Message
Todeswalzer
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 30th May 2010 13:48
I'm currently making an object that accellerates as you press the up key, using the code below...

when you release the up key the object slowly decellerates, and what i was after was when you press the downkery the object would decellerate faster, kind of like using the brakes on a car, however with the code i have in place at the moment it speeds up momentarilly before starting to slow down any ideas how i can prevent this from happening?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 30th May 2010 22:48
It's because when you are pressing the downkey, the upkey is not pressed. You should change the upkey() to this:



LB
Todeswalzer
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 31st May 2010 00:47
Unfortunatly that hasn't solved my problems all that has done is make it do the same thing but without me pressing the downkey now
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 31st May 2010 01:20
When I run this code:



It works fine for me (I substituted a sphere for your object.)
Todeswalzer
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 31st May 2010 14:56
Ah yes, you're right, i guess i may have typed it wrong or made a small error somewhere. Slightly off subject now though, how would i go about making my craft "bank" as i turn corners? i've tried roll object left and right, but most of the time it doesn't turn it at all and other times it just turns it on a totally scewed angle

Login to post a reply

Server time is: 2024-11-23 14:13:29
Your offset time is: 2024-11-23 14:13:29