collision does not work with SetRelativeScale3D

I have a StaticMeshActor named Actor1 and its collision presets are BlockAll.


Another Actor is named Actor2, which has only one StaticMeshComponent. Its collision presets property is also BlockAll, and its Tick event will call SetRelativeScale3D to change the size.

As Actor2 gets bigger it will go through Actor1 instead of the Block I expected. I want to know why or where I set it up wrong

I’m using UE4.27

1 Like

There’s nothing wrong with the setup. You’re just expecting the wrong thing. What did you expect the engine to do, actually?

  • prevent you from scaling the blue block up?
  • scale the blue block in one direction only?
  • push the white block away?
  • push the blue block away?
  • all of the above?

Any and all of the above behaviours are for you to script, not for the engine to guess. The engine will not stop you from forcing geometry intersections, it will instead do what you tell it to until it crashes & burns :innocent: If you wanted some automated interactivity, you’d need physics or movement components, or look into what Sweeps are.

Enable physics simulation on both entities and you’ll see a physically accurate (almost) response.

thanks !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.