I’m trying to set up a VR motion controller which is present in the physics world: can push physics driven meshes but also get blocked by colliders.
I thought it’s simple enough, let’s just constraint a physics mesh to the motion controller scene component.
I tried everything I could think of but I couldn’t set it up properly: the physics mesh was either stuck at world origin, flew and wobble around uncontrollably or snapped to the motion controller once and that was it.
What I figured out so far:
- I need to delay the constraint setup and the enabling of physics because the VR components start on/in the floor.
- It doesn’t matter if the constraint component is attached to the motion controller.
- SetConstraintReferenceFrame (and ref position/orientation too?) has to be called every tick.
- In the relevant nodes “Frame 1” should be used because “Frame 2” makes things worse. (It would be great if I could find any usable info on what these actually are…)
At this point it feels that I tried all the permutations of all the settings and arrangements so I’d really appreciate some pointers.