Hello, i want to detect if player is indoor or outdoor
i tried to use raycastings but i dont know how to put it together
im trying to make a script that will every 1 second will change bool value inside the player called “Indoor”
so when player is indoor then the value sets to true and when player is outdoor then value is set to false
Look on the devhub about raycasting. Once you have done that, make a loop that loops forever and waits one second and then fires raycasts in each direction looking for a roof, walls and floor.
There are many other posts on this topic that you should have read before creating this post.
Like this one.
1 Like
so i will create script where its going to raycast in few directions from players body and when all the raycasts finds a wall then its going to set the value to true i think i get thank you