moving object forward based on its rotation

Started by leethegee1, March 16, 2010, 08:32:04 PM

Previous topic - Next topic

leethegee1

Hi
Firstly thanks for your Great Engine.. i have test the demo on my Android phone from eclipse and it works Perfik ..so now i am going to get down top programming something with it .i want to start with a simple car racing game viewed from above like super sprint/micro machines....so my Question is ..is there a way using rotate and translate to rotate an object then move(translate) it forward based on its rotation

Super work

lee
SaveTheFrogs

EgonOlsen

You can rotate it with various rotate?()-methods in Object3D. To translate it into the directions it is facing, you can use the get?Axis()-methods (usually getZAxis()) in Object3D and translate it according to the returned SimpleVector. Even if you are developing for Android, you may want to look at the examples that come with the desktop version and the wiki. Albeit they all deal with the desktop version, the basics are pretty similar.

leethegee1

Thank you soo much for your help Egon you have saved me Hours of toil and frustration
SaveTheFrogs