I looked at the code for bouncing cube on a plane, and yes the example shows the cube in the plane, but..
After taking a quick look it became obvious what the problem was.
This creates 1x1 cube
g\geom = ODE_dCreateBox(space, 1, 1, 1, 1)
This create 2x2 ( -1 to 1 )
g\mesh = CreateCube()
Blitz cube is -1 to 1 which is two units not one!
so change:
g\geom = ODE_dCreateBox(space, 1, 1, 1, 1)
to this:
g\geom = ODE_dCreateBox(space, 2, 2, 2, 1)
corrects the cube size.
and changing the drop height makes it work better so
ODE_dBodySetPosition(g\body, 0, 10, 0)
to this:
ODE_dBodySetPosition(g\body, 0, 20, 0)
The cube will now bounce happily on top of the plane.
The sample program was doing exactly what it was told.
8)
What command(s) did you say swapped x,z ??
cheers
After taking a quick look it became obvious what the problem was.
This creates 1x1 cube
g\geom = ODE_dCreateBox(space, 1, 1, 1, 1)
This create 2x2 ( -1 to 1 )
g\mesh = CreateCube()
Blitz cube is -1 to 1 which is two units not one!
so change:
g\geom = ODE_dCreateBox(space, 1, 1, 1, 1)
to this:
g\geom = ODE_dCreateBox(space, 2, 2, 2, 1)
corrects the cube size.
and changing the drop height makes it work better so
ODE_dBodySetPosition(g\body, 0, 10, 0)
to this:
ODE_dBodySetPosition(g\body, 0, 20, 0)
The cube will now bounce happily on top of the plane.
The sample program was doing exactly what it was told.
8)
What command(s) did you say swapped x,z ??
cheers