Help needed: True space flight sim

Hello



I am trying to get my head round the physics engine.



I want to implement a spaceship flying through space obeying the laws of physics (Newtons will do).



So I have a ship pointing in a given direction. I apply some thrust and it moves in that direction. If I rotate the ship it still moves in the original direction it is just facing in the new direction. If I apply thrust in the new direction the vector of the new direction is applied to the original direction to come up with a new moving vector.



So I guess I have a facing vector and a moving vector.



My question is can I use the physics engine to simulate this? Can someone please point me in the right direction (no pun intended!)



Thanks in advance.

Read the physics tutorials, they should anwer your questions. The only tricky part is to get the rotations done, however there are some forum posts for similar problems (roating a phyic object into a desired rotation).

Thanks I have just come across this post which has sorted my rotations…



http://hub.jmonkeyengine.org/groups/physics/forum/topic/simulating-a-space-ship/



I’ll try and read the physics tutorials.



(as an aside … I am just doing this for the fun of it … Would anyone be interested if when I get it going I document and “contribute” it?)

@rsksmiles said:
Thanks I have just come across this post which has sorted my rotations...

http://hub.jmonkeyengine.org/groups/physics/forum/topic/simulating-a-space-ship/

I'll try and read the physics tutorials.

(as an aside ... I am just doing this for the fun of it ... Would anyone be interested if when I get it going I document and "contribute" it?)


Yes, of course! :D

If you find that there are holes in the documentation, your forum account allows you to also edit the wiki, so please update!