Hi,
for my 3D pinball, I am trying to implement a gate rotating around the Y axis.
I have literally copied the sample code of the 3D demos:
rotVect=CreateVector3(0,1.0,0)
posVect=CreateVector3()
contactStatus=GetObjects3DPhysicsContactPositionVector(flippers[elem].elementsID[1],flippers[elem].elementsID[0],posVect)
flippers[elem].jointID=Create3DPhysicsHingeJoint(flippers[elem].elementsID[1],flippers[elem].elementsID[0],posVect,rotVect,1)
Set3DPhysicsJointHingeLimits( flippers[elem].jointID, -180.0, 0.0 )
where .elementsID[1] is a vertical bar which is overlapped to the right end of the gate, while elementsID[0] is the gate itself.
In the demo there is no defined gravity, in my code I have defined a gravity
Set3DPhysicsGravity(0,-5,-1.5)
What happens is that the gate does not stand up and rotate around the Y axis, but leans down as it were attracted by gravity, and it stay sticked to the Y axis only in 1 point.
Where am I wrong?