Jan 12, 2014 at 6:37 PM
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
In your case of using assembly language to make a projectile in Cave Story move toward the player, there is no need to use the sine and cosine functions. Traditionally in mathematics for cases such as this, angles are plugged into the sine or cosine in order to find the x and y distances between two objects when they are not given. Since in assembly you should be able to refer to where the x and y positions of the player and projectile are, you could simply subtract the player x and y positions from the projectile counterparts, and you have the x and y distance between the two objects. I am going to assume that you know what to do with the x and y distances between the objects.Bombchu Link said:How do I use sine and cos to make an projectile home in on a destination? (the player)