This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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

Godot version Version 3.2
in Engine by (12 points)

1 Answer

0 votes

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" :)

by (8,188 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.