GameMaker [SOLVED] Discover 'direction' with hspeed and vspeed positions

josyanf1

Member
Hello! I am trying to discover the direction variable having the hspeed and vspeed positions.
Since if you use hspeed or vspeed the direction variable gives 0.

I'm a little lost, can someone help me? :S

Thanks in advance ^^
 

FrostyCat

Redemption Seeker
If you use built-in speeds like hspeed and vspeed, direction should update automatically for you.

The situation you described would happen when you use custom speeds like the kind Spalding or HeartBeast do in their videos. You would use something like point_direction(0, 0, hsp, vsp) instead, where hsp and vsp are the custom speed variables.

Another situation is when things are manually positioned, such as when traveling on a path or when using custom speeds. In that case, you would use point_direction(xprevious, yprevious, x, y) in the End Step event.
 

josyanf1

Member
If you use built-in speeds like hspeed and vspeed, direction should update automatically for you.

The situation you described would happen when you use custom speeds like the kind Spalding or HeartBeast do in their videos. You would use something like point_direction(0, 0, hsp, vsp) instead, where hsp and vsp are the custom speed variables.

Another situation is when things are manually positioned, such as when traveling on a path or when using custom speeds. In that case, you would use point_direction(xprevious, yprevious, x, y) in the End Step event.
Yes! That's just what was happening to me, thank you very much :))
 
Top