JV-ODE: Break my tables!

Blitz3D Forums/Blitz3D Userlibs/JV-ODE: Break my tables!

Ah, you're going to have severe problems forcing an objects position and rotation with ODE. The correct way is to add force/torque to the body or joint, ODE should be allowed to handle the position and rotation of all objects in the simulation.

Try adding the following to the Render Loop...

dBodyEnable(masterBody)
If KeyDown(59) Then dBodyAddForce(masterBody,-10,0,0)
If KeyDown(60) Then dBodyAddForce(masterBody,10,0,0)
If KeyDown(61) Then dBodyAddForce(masterBody,0,0,10)
If KeyDown(62) Then dBodyAddForce(masterBody,0,0,-10)

Use the F1-F4 keys to move the player box.

If you don't want the box to roll over, you can either lower its friction directly (see geom contacts) or create a sphere with a cube attached by a joint (encasing the sphere, except for its base). There are some demos showing the latter in the older JV-ODE threads, have a look for Psychic Parrots demo.