Tagging walls

Hello all,

I am making a TPS game with climbing mechanic. I have the climbing implemented, but right now the player can climb any surface, which should not be the case. I want to tag certain actors “climbable”. How exactly should I do this? I use Sphere trace by channel for tracing walls.

Depends on you set it up. If you did not use classes to construct levels, you can manually select any static mesh actor (or its components) in the scene and add a tag:

You can tag the entire actor or just one or more of its components.

First of all, thanks for the reply. I have added a tag to my static mesh actor. But then how do I implement it? Do I just leave the target as it is?

Here is my tracing code for the wall:

If I do this, the character does not climb anything even though the tracers work:


We need to check whether the Hit Actor has matching tags:

alrighty, i will try that. The walls we are using are STaticMeshComponents btw, is that gonna be a problem?

Nah, it’s fine. In the longer run it may pay off to:

image

This way you have a Static Mesh Actor that has a Static Mesh & Material, but also has a pre-defined tag, can host logic, have variables and be interactive in some other way.

And if you ever need to update this kind of surface, you do it once in that blueprint rather than laboriously select all 168 climbable walls in the level and fix a tag typo…

Thank you, it worked perfectly. You are GOD!