Changing mesh with trigger box

How can I replace a mesh with another mesh when the e key is pressed on the keyboard in the trigger box.

Create a boolean variable in your player character:

Now create an actor, add box collision to it make sure it is set to overlap dynamic or overlap pawn (considering you might be using characters)

In the Actor with trigger box you define the on begin overlap and on end overlap events, you cast the other actor to your player character and set the “Can Change Mesh” to true when begin overlap and false when end overlap.

Now in your player character you simply do a branch check on action input. You can simply get the mesh and set mesh asset.

1 Like