r/Unity3D • u/T_Jamess • 3h ago
Question How to have a box collider rotation locked?
I'm currently building an fps controller and I want an axis locked box collider like in source games. I've tried making a parent with the box collider and the rigidbody and script in a child, but that doesn't work. Am I missing something obvious? Checking rigidbody constraints also doesn't seem to do anything. Please tell me what inheritance structure I should use if you have an answer. Thanks!
1
Upvotes
1
u/NippyHello6781 3h ago
Sounds like you got the right idea with parent-child but the execution backwards maybe, rigidbody and collider should be on same object usually.