How can you properly set a physics contraint's contrained actors or components at runtime?

I’m trying to spawn a physic constraint actor at runtime and set its constrained components to a sphere spawned at runtime as well as the player’s hand mesh, which is also spawned at runtime (VR Template MotionController blueprint).

I am getting the following error:

Constraint ‘/Game/VirtualRealityBP/Maps/UEDPIE_0_MotionControllerMap.MotionControllerMap:PersistentLevel.PhysicsConstraintActor_0.MyConstraintComp’ attempting to create a joint between two actors in different scenes ( ‘None’ and ‘/Game/VirtualRealityBP/Maps/UEDPIE_0_MotionControllerMap.MotionControllerMap:PersistentLevel.BP_MotionController_C_1.HandMesh’ ). No joint created.

Here is the blueprint I am using to do so. ‘ImpactPointObject1’ is the sphere spawned at runtime, and ‘Hand Mesh’ is being referenced from the MotionController blueprint, which is spawned as part of the MotionControllerPawn actor in the VR Template. To be clear, the physics constraint is being spawned after the ‘ImpactPointObject1’ but is still being returned as ‘None’ in the error message, from what I can tell.

My goal here is to be able to attach different objects to each other in real-time within the game and have them be bound by physics contraints. Any help would be greatly appreciated. Thank you!

I remember trying to create a constraint between the Character Component and an Actor in the world; that did not end well. Even if they got attached to each other, the movement was awful.

Have you considered not to create a constraint, buy to snap that sphere to a socket? Maybe that will work better?

Edit: have you seen this thread: No joint created - warning - World Creation - Unreal Engine Forums ?

Thanks for the info. I should have mentioned that I am trying to connect two objects ‘sphere’ and ‘hand’ with a cable actor so the physics constraint is to keep them from separating to infinity. I did check that link out but it seems to be related to a different problem. Appreciate your input.

Great video but I don’t think it solves what I’m trying to do unfortunately. If you’re familiar with the game ‘Just Cause’ I’m essentially trying to create the grappling hook where you can attach two objects together via a cable and they will interact appropriately. Thank you for sending the link.

This video does not use physics constraints but it does involve attaching objects together in real time with simulated physics. Marco’s entire youtube channel has some good content to learn from. Realistic Physical Objects in VR - Unreal Engine 4 Tutorial - YouTube