How do turn character invisible when overlap with a another character

Like if the player gets caught by the enemy the player will just turn invisible 100%
with the help of blueprints?

If I understand you correctly, you’ll want to:

  1. Add collision capsule/box/sphere to your enemy.
  2. Instigate an “On_Component_Overlap” there.
  3. Cast to your player character.
  4. Set “Hidden_In_Game” TRUE once the overlap condition is met.

Imma see if that works, thanks!

So i have tried it this way in the enemy BP, but i don’t see any difference, is it correct?

You’ll need to uncheck “New_Hidden”.

I know, it’s kind of unclear.

Also, it may be best to not use your enemy’s collision mesh but, instead, add another collision mesh component that is larger than the enemy itself.

So i create a box collision and unchecked New Hidden, but it’s still not working for some unknown reasons
lol i’m not Pro yet when it comes to coding so i might be doing it wrong?

1 Like

Okay, let’s make sure that the overlap is occurring and that the cast is not failing.

Add a print string to the end of the function.

If it’s successful, you’ll see text rendered on-screen.

So the print string works but the character still not going invisible :man_shrugging:
i even tried it on the player but it still won’t work…

Now, instead of trying to make the entire character invisible, try retrieving the character’s mesh.

You’ll pull out from the CAST node “As_BP_Tedly_GR_02”, search for the mesh, and then search for the set visibility/hidden node.

1 Like

HEY! Finally it works!
Much thanks man :pray:

1 Like

You’re welcome and good luck!

1 Like

same to you bro :+1:

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