In an environment with “simulate physics” enabled, using “set actor location” seems to cause issues with child actor components not moving correctly.
My actor A blueprint structure is as follows:
RootScene
-Cube1
–Cube2
—Cube3
–Cube4
-Cube5
–Cube6
—Cube7
—Cube8
My goal is to move the entire structure to a new location or make a rotation while maintaining their current relative positions.
Initially, all cubes have “simulate physics” enabled.
Steps taken:
- Disable “simulate physics” for all cubes.
- Move actor A using a command like
set actor location(0,0,10000)
. - Enable “simulate physics” for all cubes.
This works as expected.
However, if I encapsulate some of the cubes into an actor B and add B as a child actor component to A, parts of B do not move correctly. For instance, if I encapsulate Cube6, Cube7, and Cube8 into actor B:
RootScene
-Cube1
–Cube2
—Cube3
–Cube4
-Cube5
[–Cube6
—Cube7
—Cube8] //actorB attached as a child component
In this case, only Cube1-Cube5 move correctly, but Cube6-Cube8 do not.
Furthermore, if Cube6, Cube7, and Cube8 in actor B initially have “simulate physics” disabled, directly using “set actor location” on A moves Cube6, Cube7, and Cube8 correctly. But if I enable “simulate physics” for Cube6, Cube7, and Cube8 even once, and then they will not move correctly anymore, even if “simulate physics” is disabled.
Solutions I have found include:
- Using physics constraints.
- Directly calling “set actor location” on actor B.
However, these methods either require extra setup or do not handle rotation well. Is this a BUG? And is there any better way to achieve my goal?