Author Topic: moving object forward based on its rotation  (Read 4265 times)

Offline leethegee1

  • byte
  • *
  • Posts: 9
    • View Profile
    • Computer Games 4 Kids...no Guns...No Violence.Just Loads of Fun
moving object forward based on its rotation
« on: March 16, 2010, 08:32:04 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: moving object forward based on its rotation
« Reply #1 on: March 16, 2010, 11:05:55 pm »
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.

Offline leethegee1

  • byte
  • *
  • Posts: 9
    • View Profile
    • Computer Games 4 Kids...no Guns...No Violence.Just Loads of Fun
Re: moving object forward based on its rotation
« Reply #2 on: March 17, 2010, 07:27:04 pm »
Thank you soo much for your help Egon you have saved me Hours of toil and frustration
SaveTheFrogs