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:)
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:)