How to detect the collision of static mesh

For example, an integer variable is defined. When a static mesh 1 produces a collision, the output variable value is 1, and when a static mesh 2 produces a collision, the output variable value is 2.

272718-qq截图20190329202819.png

1 Like

You could set a Tag on either the actor or component that you’re checking collisions against. Tags are a Name variable types set to whatever you want (including numbers). Then from the OtherComp[onent] or OtherActor pin in this BP, call a “Has Tag” node and do an IF check for it being equal to the INT you’re trying to match it to.

1 Like

Thanks for your help,it’s very useful. :slight_smile: