106
General discussions / How to make an sprite go to correct direction
« on: January 04, 2011, 02:12:48 am »
Hi s3rius,
Your function works like a charm.
You can see my game prototype here:
http://www.prsolucoes.com/downloads/solodefender.zip
But i have a simple problem now, my shoot with your function go correctly to X/Y position, but i need that it continue moving if not collide with target, so i need that the shoot continue moving to current direction and go out of screen.
So resuming:
How i can change your function to make my shoot go to a direction based on targetX / targetY position and dont stop move?
Your function works like a charm.
You can see my game prototype here:
http://www.prsolucoes.com/downloads/solodefender.zip
But i have a simple problem now, my shoot with your function go correctly to X/Y position, but i need that it continue moving if not collide with target, so i need that the shoot continue moving to current direction and go out of screen.
So resuming:
How i can change your function to make my shoot go to a direction based on targetX / targetY position and dont stop move?