Download

Parenting via Blueprint or Hierarchy

I’m relatively new to Unreal coming from Unity, so this is quite a beginner question. I have a simple interaction script (linked into slightly modified FPS example) that begins an object moving or stops it. Works great, but I would like a small object, lets call it a button, to move itself and a number of other attached objects, lets call it things attached to button. If I add the things attached to button within the object containing the blueprint they also become interactable. If I drag drop the other objects in the hierarchy under the button, so they cascade open (I thought this would be parenting), the button moves but the other objects don’t. How do I make these other objects children of the button that inherit transform/rotation/scale?

Top-right corner of the window for the child blueprint, click on the blueprint link after Parent Class. Select a new parent for your blueprint.

It depends on what you really mean here by attachment/parenting/movement and so on. In the World Outliner, if you have a Movable object (Transform mobility setting in the Details panel), you can attach another Movable object to it by dragging the other object onto it in the World Outliner panel. The attached object will indent to the attached-to object in the World Outliner panel. Then, when the attached-to object moves, either by you in the editor, or dynamically in game by your script, the attached object will move with it, preserving the same relative transform between the two objects.

For a visual way of thinking about this, in the Actor Waypoints video at about 00:45, the cone and the sphere are independent, non-attached actors with their own movement commands. You can see they move on their own paths. But, if I attached the cone to the cube per the procedure above, the cone would pick up the relative motion of the cube and move in a triangular motion just like the cube, but always at the same relative distance and rotation from the cube’s position and rotation.