Static mesh moving, not the actor

Hey folks,

Just getting started with the Unreal engine and I’ve run into something that I don’t understand.

I have a Pawn (BP_Cube) with a static mesh of a cube and I’m using physics to move it around the default level, which works fine.

I was then trying to get the distance from the center of the level to the Pawn. To do this I spawned a target in the center of the level and used Get Distance To to get the distance between the two.

Problem is that the distance is always constant. After poking around, it looks like the top level of the Pawn BP_Cube isn’t moving, but the static mesh (the cube) is.

BP_Cube ← Transform values are always constant

  • DefaultSceneRoot (inherited)
    – StaticMesh (inherited) ← Transform values change as the cube moves

I’m assuming that the actor’s position should be updating, but I’m not sure what I’m doing wrong? Let me know what I need to share to help answer the question.

Thanks,

Possibly you are only moving the mesh and not the actor, can you show the bp/code responsible for the movement?

I think you’re right, and that is the problem. I’m not sure how to fix it though. I’ve tried Launch Character and Add Force to the character movement, but neither moved the cube.

Here’s what I’m doing.

That did it. Thanks!

You are applying force to the mesh which I am guessing is not the root component of your character. If you can set the mesh to be the root, that will solve the problem.

1 Like

excellent, good luck with the rest