Hi. I’m currently working on a VR game for Oculus Quest 2. I want to create an openable box, which has a box/storage part and a lid. I would like to grab the lid with my controller and then be able to open the box, but only by rotating the Y axis of the lid.
I tried a few attempts, but I just can’t get it to work with the grab component. Is there a way make the object grabbable but make it only rotate in Y axis, not move it or rotate it in any other axis?
Yes, I believe that component will be necessary. The issue is that the grab component keeps “rewriting” whatever constraints I set in the Physics Constraint. Even though I specifically lock the motion and rotation axis, it still gets picked up and moved freely by the grab component, and when I release the grabbed lid, it snaps back in a weird position.
I don’t have the grab component on this screenshot, but it should be on the Lid static mesh with the box collision “Box1”.
Another path forward could be creating a box skeletal mesh. (Where the lid would be a bone) There’s such thing as Inverse Kinematics for coding mesh limits. (Like where a leg won’t get ripped apart if the foot is stretched beyond it’s limit)
I feel like there should already be an example of this somewhere on the internet. The closest thing I can find right now is this lever tutorial. (A lid is kind of like a lever in reverse? )