I’m creating a VR scene. Each hand has a physics constraint which I modify at runtime to attach other actors to make grabbing work. One end of the constraint is at the pivot of my motion controller, the other gets attached to the grabbed actor. This works great for both world-constrained objects (doors, levers, non-pickup-able objects) and pickup items (bottles, guns, tools). The constraint is set to have (0,0,0) in both position and rotation constraint limits, and stiff springy reactions.
However, this method assumes that the offset between the items is as it is when the grab is initiated. This means the object or door handle will have an offset as per the difference between the world transforms. This isn’t such a big deal in some situations, but is a bit more problematic when using two-handed items.
What I’d like to do is exactly specify where the physics constraint is anchored in the grabbed actor. I’ve tried using “Set Reference Position” but it doesn’t seem to consistently do what I want.
My current workaround is to move the actor to the hand position then connect the physics constraint. I’d like to get the same result without moving the actor.