Collisions without rotation

Hi everyone,

I discovered this fantastic library today and i’ve a question. I began a game : a “ShufflePuck Cafe” clone (you can go here to see what is it). So, player and AI have a bloc, and they have to hit a small cylinder with their bloc to put it into the other player’s goal. But my problem is that I use Collision to cylinder, player’s bloc and gameboard but, sometime, the cylinder make a rotation and it become uncontrollable so I would like to limit collision slide to the game board, without rotation (except Z-Axis rotation : the cylinder can rotate around itself). I tried “applyContinuousForce” or “applyContinuousTorque” but it doesn’t work ! How can I limit the collision to slide only and no rotation ?

Thank you for advance.



PS : Sorry for my poor English but I’m French with a French Language Education…

You could remove the rotational component in each physics tick. Basically physicsNode.setAngularVelocity(0).

How do you do that normen? I was playing with trying to create a PhysicsNode version of PhysicsCharacterNode a while back but this was the one thing that tripped me up. During each updateLogicalState in the node, I was doing setAngularVelocity(Vector3f.ZERO), but yet the node just rolled around.



Cheers,

~FlaH