How do I make it so that an object rotates on only one axis?
I have a steering wheel object with a square mesh collider that is connected to an empty parent which functions as the center of rotation for the steering wheel. My plan is to have this wheel interactive so that if you grab the whee with an HTC vive, you can only rotate it around that pivot point, as a steering wheel should rotate.
I'm having trouble finding out how to lock this rotation though; the rotation I want is represented by the yellow circle in the image below, as it doesn't correspond to the x,y or z axes. I'm not very good at scripting because I'm still very new to Unity so any help there would be highly appreciated.
Thank you!
Your answer
Follow this Question
Related Questions
Rotation of object in Z axis based on direction the rotation of the camera 0 Answers
Oculus Quest: Unable to grab grabbable object,Oculus Unity: Can't grab object with OVRHands 0 Answers
Need help with two Configurable joints ! (Two hands grab in VR) 1 Answer
Spawn object in hand and bind it to hand transform? 2 Answers
XR Grab and Unity joints issue 0 Answers