Download

hiearchy not working when playing, but working in editor

I have a cube that i dragged under a sphere to make it a child of the sphere. when editing, when i move the sphere , the cube follows it perfectly as i would expect. however, when i run the game and i shoot the sphere, the sphere moves but the cube does not move with it. is there something else i have to do besides making it a child in the hierarchy?

I’m pretty sure the hierarchy is just for editing. You would need to use an object group perhaps or make a bp of the cube and sphere.

There may be other ways to constrain objects via bp too.

If you did that in the outliner, that’s just for organizing your stuff. If you want to create hierarchies, you can create a simple class blueprint that does this and the add the blueprint to the scene.

Cheers,
Michael

Is the cube a physically simulated object?
Objects that are physically simulated are not attached at runtime. This is because doing so is non-trivial.
We still allow you to use the hierarchy in the editor for convenience of moving a group of objects together (e.g. table with many books as children), but this is not the case at runtime.

To get the attached behavior you can use a physical constraint, but this has some implications. We are working on a feature where you can attach physics objects together and have them be attached at runtime. See “Automatic collision welding for attached objects” in the UE4 roadmap