Hello!
I’m trying to make physics-driven VR hands, and for that purpose I am spawning hand actors and binding them with a physics constraint to a child object of a MotionControllerComponent.
When I create this in Blueprint only, it works exactly as intended. But when I try to recreate it with C++, the constraint seems to fail.
The above is the Blueprint code. When I run this it works, and the physics constraint looks like this:
Here I’ve attempted to recreate this in C++
But when I run this, the hands do not attach to the motion controllers, they just fly off. The physics constraints look like this:
As far as I can tell, the component setups are identical and the code should be doing the same thing, and the constraints seem to have the right data with C++. If anything, the data is more correct as the BP version doesn’t have actor pointers, just component names.
But clearly it doesn’t work, and I just don’t understand why. The biggest difference I can find between the two is that the BP “Setup Constrain Components” take component references rather than just FNames, but I figure having pointers to the correct actors should be enough of a reference for the C++ version to constrain the correct components.
I’d love any input or suggestions about what could be going wrong here.