Rotate object to face another...?
I have an enemy moving from one end of the screen to the other, and I need a turret to rotate and point towards the enemy's x/y coordinates. I used the 'set angle' command, and retrieved my enemy's x/y coordinates, but the turret's rotation axis is in the corner of the sprite... How do I set the object's rotation axis to be in the center?
Re: Rotate object to face another...?
Edit the hotspot of your turret graphic to the center, by clicking on the fish looking button.
stephen1980
Re: Rotate object to face another...?
Okay... Thanks. That worked.
Can you think of a better way of making an object rotate to follow another? My way makes it rotate whenever the enemy moves, but it doesn't remain aimed at the object... It rotates faster than the enemy moves... Kind of inaccurate.
Re: Rotate object to face another...?
Jaffob made a great example. Let me see if I can find it.
Edit: Here you go. :)
Rotate Example
stephen1980