Bonjour/Hello
i’m asking myself if a raycast should be the method used to reveal a secret zone? For example :
I have some sprite that i want to hide if the character cross the raycast…
Could you tell me if it’s possible to create a “unhide zone” instead of a line?
You could just use a BoxCollider2D with isTrigger set to true. Scale it to what ever size you want. Then in a script implement OnTriggerEnter2D(Collider2D other) and check if the GameObject of the Collider that touches the trigger (maybe with CompareTag?) is the player. If it is, then hide or unhide the Sprite depending on how you want it to work.