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 / Mouvements problems

Author
Message
Cortez
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: Montreal.Quebec
Posted: 15th Mar 2004 05:38
I have the same movement problem in 3 situations:

1-When I rotate my spaceship, the movement is not smooth.


How can I put more fluidity in my movements (acceleration)?

2-I also have the same problem when the spaceship gain or loose speed



3-I use "t" to take off and "l" to land. How can I add a acceleration effect?



Thanks
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 15th Mar 2004 07:19
The key to smooth movement is not to move a fixed amount per loop or key press but to move at a fixed rate per loop. Since each loop can vary in length, you the timer functions to determine the elapsed time per loop and multiply that by your turning rate, etc.
--
TAZ

GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 15th Mar 2004 16:31
Zircher more or less explained how to get truely fluid movement using the timer()... However, that requires more complex code. I think this will give you the effect you want...



You can apply the same technique to your acceleration/deacceleration and I think your takeoff/landing code also...Well... I hope I helped

Do not thwart the way of the dragon. For thou tasteth like chicken.
Cortez
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: Montreal.Quebec
Posted: 16th Mar 2004 05:12
Thanks,
It`s perfect! Now my spaceship movements are fluid like I wanted.

But I found an other problem...
It`s the roll effect. I use this code to make the spaceship roll:


When the spaceship is in line with the z axe (o degre on the y axe) everything is ok, but if I turn the ship (ex: 90 degre on the y axe) the roll don`t really work and when it`s facing the opposite direction (180 degree y axe) the roll is reverse.
How can I fix this?

Login to post a reply

Server time is: 2024-09-22 02:33:37
Your offset time is: 2024-09-22 02:33:37