- Home /
AI Still Sees The Player When Layer Has Changed
I have a respawn setup that moves the player to the spawn position and changes the layer of the object as to be invisible to the AI (using layermasking). When the player presses 'F' the layer changes back so that the AI can see them again, but changing the layer does not make the player invisible to the AI. How can I fix this?
ps. Everything works fine, the layer does in fact change, but the AI does not realise the change in layers.
Answer by MonkeyAssassin8 · Oct 28, 2011 at 12:15 PM
Shit I made the stupidest mistake. sorry! I didn't have a collider on the object that the AI uses to see the player.
Your answer
Follow this Question
Related Questions
Layermask (raycast) wont work... 4 Answers
Detecting that I'm clicking a unit even though I'm not? 0 Answers
LayerMask for RayCast 1 Answer
Return Objects hit by raycast, check against a array of all objects? 1 Answer
How to make my raycast also hit deactive objects WITHOUT showing the object? 1 Answer