HIDE SYSTEM WITH ANIMATIONS

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SantosTNT

Hey guys, sooo im trying to build a platformer stealth game, and what i was thinking is lets say my character can hide inside closets… how would you aproach this system?? i have to make it so the enemies wont see me when im inside the closet

:bust_in_silhouette: Reply From: Inces

I would create group for all nodes that allow player to hide behind them and set visible property to true/false upon collisions with these nodes. You could also use shader for that, or if You dont plan on using collisions - make use of Z index for sprites. Of course all of these are just visual so it won’t make difference for your AI’s detection, You have to code it additionally, make some state machine with “hidden” and “noticed” :slight_smile: