I’m developing a RTS where you can command tanks. Lets say I have a tank at the pink block. The player tells the tank to go to the teal block. So the tank follows the order and goes to the teal block, but then it would go in the water and die. How can the tank know if it is going to go into water and stop before it does?
You can have a collision box, and have the tank shoot a raycast or get distance to the collision box.
1 Like
You can raycast and have the origin go right infront go the box. Check if the material is water, if it is then stop.
3 Likes