[ODE] How to keep capsule stand and how to make it hover over below objects at a certain height?
michael kapelko
kornerr at gmail.com
Sun Aug 6 05:26:36 MST 2006
To make capsule stand, I make its angle always of 90 degrees. But
sometimes when some heavy box falls down onto it, it lays and when
setting to 90 degrees, it becomes half inside the floor.
To make capsule hover at a certain height, I tried to add force along Y
axis (this points up), but this makes the capsule constantly jumping. I
tried to dBodySetPosition (body, pos[0], pos[1] + 5, pos[2]), but then I
get the error: ODE INTERNAL ERROR 2: invalid operation for locked space
in dGeomMoved(), I also tried to dGeomSetPosition, but this causes error
either.
So now I wonder how to do it.
I there exist several articles which I read, including the 3 ones in ODE
FAQ.
The only formulas I found to keep capsule stand are:
AV = get angular velocity
R = get euler rotation
R += T * AV
apply torque( -R.x * C, -R.y * C, -R.z * C )
I didn't try it, main problem is hovering. And I found nothing concrete
about hovering.
Can anyone help me?
Thanks.
More information about the ODE
mailing list