- Home /
How to detect a enemy and change my png according to the enemy position
I am creating a game with the help of PNG sequence of 8.Its is a tower defence game.Now i want that my enemy comes in the range of the tower and when it hits the rang my tower start changing its position accoriding to the enemy position>As these are images in pngs i have to tell the seq that the enemy is at this position now change your png to this tile.
This isn't clear enough. Are you using 8 PNGs to show the tower at 8 different angles? Why don't you rotate the tower?
because of the quallity...the quallity pngs giving is the one i want..
yea pngs are at 8 angles..that will be 2d but look like 3d
Answer by SkaredCreations · Dec 22, 2011 at 08:54 AM
Add a sphere collider (set "Trigger" checked, you need an event not a collision) that will work as your "defense range", create a script with an OnTriggerStay function where you set your target (if not already set) and call LookAt.