random disfunctioning of joint

sneaky_chappy

28-04-2008 22:13:12

Hello people,

In my game I have a 3D cursor with an ode body attached.

The cursor is able to rotate a sphere by connecting the cursor body and the sphere body with a BallJoint. the joint is attached and anchored to the position of the cursor body when the mouse is pressed and detached when the button is released. (the position of the sphere is fixed so the cursor body does not affect the position, only its orientation). This works great, the control is really intuitive. Though my problem is that for random runs of the game the joint does not attach (thus there is no interaction between cursor and hand)...and sometimes after a while when there has been interaction with my 3d cursor and other ode objects in the scene the interaction with the sphere is restored and stays that way.

it is not a problem in my input handler and all other joints in the scene are fine everytime I run the game. The code is really simple:
-on a mouseclick I attach the bodies and set the anchor
-on mouse release I detach the bodies

What could this be?


any help is really appreciated:)

rewb0rn

28-04-2008 22:21:45

hm supposing that there is no bug in the wrapper, you should either ask in the mailing list for ode itself (dont get rid of telling this: www.ode.org ;)) or there still is a bug in your application that you havn't noticed yet.

sneaky_chappy

19-05-2008 10:56:37

I fixed it by turning vsync on...so I assume for some reason ode did not like the high framerate (~500fps) I had before