Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Line cast doesn't work once game is built.

$
0
0
I've encountered a weird issue where Physics2D.LinecastAll stops working when I actually build the game. I use a linecast to check if an enemy has reached a wall, if it has, it will turn around and patrol the opposite direction. I also use a linecast to detect if the player is close enough to an enemy to perform a melee takedown. Both of these linecast checks work when the game is running in the inspector. But once I build the game, the enemy ai will run straight into the wall, and the player is unable to perform a melee takedown. Meaning, the linecasts are not working. Does anyone know how to fix this issue?

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>