Change Static Mesh's Collision in Blueprint

I have the static mesh’s collision set to no collision.

However I would like to change the collision to active once endOverlap has occurred with a player.

How can I accomplish this?

What I normally do is this

  • Select the collision preset to use when collision will be active
  • Change the preset to Custom…
  • Set Collision Enabled to No Collision

Now you can use the Set Collision Enabled blueprint node to turn collision on or off whenever you want.

My player passes through but when falling down, the collision is not being enabled.

Here are my settings, is there anything that I am doing wrong?

Oh, you want to use the mesh itself to trigger the end overlap event. The above won’t work in that case.

Instead, set the mesh collision preset to OverlapOnlyPawn. Now OnComponentEndOverlap should fire. When it does use Set Collision Profile Name to change the preset to BlockAllDynamic. Hopefully that should do it.

This is just blocking my pawn from beginning to overlap through the static mesh.

I have many actors inside my blueprint that I wish to have a one way collision,
is there a better way that could do this on a global scale for all objects in a blueprint actor class? They must essentially be toggle-able → land on top of any of them there will be collision but come from up underneath one and there will be no collision to where the player can go through and land on top?

Is there a way to set collision to “no collision” when coming from below the static mesh

and set collision to “active” when coming from the top or landing on the top of the static mesh?

It’s a little more involved, but you could do it by setting up a system of box colliders above and below the mesh to generated the overlap events which cause the collision response to change.

67622-toggle_system1.jpg

I’d also recommend trying to re-use a blueprint containing a single mesh instead of grouping all the meshes into one big blueprint.

This method will work better than I anticipated. I just wish there was an option in custom collision to do this. Maybe it could be offered as in a future update? Useful, thanks!!!