- Home /
Axis Clamping Question
How can I clamp an objects rotation and position along certain axis with javascript, like in a 2d game where the character can't move towards the camera, just up, down left, and right?
Comment
Best Answer
Answer by StephanK · Mar 14, 2010 at 10:31 AM
Take a look at ConfigurableJoint. With this Component attached you can restrict movement and rotation to certain axes.