Finding the difference in Angles
Hi.
This post is about finding the difference in angles. Angles are very unbelievable in GameMaker. Because they have to use the X and Y co-ordinates to give 2 angles this makes it harder to figure out what the difference in angles. We will have to use a example to make this script more easier to understand.
[code]
angle = point_direction(x,y,argument0,argument1)
angle2 = point_direction(x,y,argument2,argument3)
angle3 = angle - angle2
show_message(string(angle3))
[/code]
Explaining what everything does.
angle = point_direction(x,y,argument0, argument1) - The biggest angle you need to use. This defines the angle which is will be taken away from the smaller angle (or the first angle)
angle 2= point_direction(x,y,argument2, argument3) - The smaller angle. Subtracts the first one from itself.
angle3 = angle - angle2 - Finds the difference by taking away angle (big one) - the smaller one
This post is about finding the difference in angles. Angles are very unbelievable in GameMaker. Because they have to use the X and Y co-ordinates to give 2 angles this makes it harder to figure out what the difference in angles. We will have to use a example to make this script more easier to understand.
[code]
angle = point_direction(x,y,argument0,argument1)
angle2 = point_direction(x,y,argument2,argument3)
angle3 = angle - angle2
show_message(string(angle3))
[/code]
Explaining what everything does.
angle = point_direction(x,y,argument0, argument1) - The biggest angle you need to use. This defines the angle which is will be taken away from the smaller angle (or the first angle)
angle 2= point_direction(x,y,argument2, argument3) - The smaller angle. Subtracts the first one from itself.
angle3 = angle - angle2 - Finds the difference by taking away angle (big one) - the smaller one
Labels: Advanced

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home