physics for flying objects

Jan 23, 2008 at 1:42 PM
hey, nice work you´ve done here!

i have a question about the car physics. is it possible to change it in some way to use it also for hoovercrafts or similar objects, flying near above the ground.
or can i use the other primitives to fly around with them (also for real flying in 3d, like space ships)?

thanks in advance and sorry, if my english isn´t the best ;)

Jan 23, 2008 at 10:03 PM

i'm not the developer for this project, but i have been working on a marble rolling game with JigLibX and might be able to give you some tips. the simplest way to get the primitives to move by adding velocity to their Body classes. i'm not sure how new you are to XNA, but the getting started tutorials have good examples of how to control a model using input (you would do the same but have the input control the body velocity). the space ship would be easy to control this way if you set PhysicsSystem.Gravity to 0.

as for the hovercraft, i would suggest using a 2x2x4 box, for example, that is controlled in the xz directions and gravity keeps it on the ground. then you draw the model in the 2x1x4 upper half of the box entity. this would give the appearance of hovering 1 unit off the ground. these are simple ideas, but i hope they give you a good starting point.