Simple example on how to control an object?

Apr 3, 2008 at 11:44 AM
Edited Apr 3, 2008 at 11:52 AM
Does anyone have an sample of controlling an flying object with the keyboard in JigLibX?

There's an example that comes with JigLibX showing off how to control a car, but that's pretty extensive (car physics, wheels and so on), an example just showing a flying object (ship, airplane or whatnot) instead would be easier to follow.

Some parts I've managed to get a grip of but some are a bit unclear. Would be nice to see how to use the physics engine. Like, when to use Orientation, Velocity and AddWorldForce on the Body object when controlled by an keyboard.
Apr 3, 2008 at 2:29 PM
I think what you want IS the basic car. Just pick away the wheels and simplify it. Basic movement is taking where the object is facing (vector3) and either moving it toward or away from it. Turning is simply modifying the vector left or right.

I guess you could take a chase cam and turn it into a physics object.