I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: l3agu32 on October 29, 2015, 10:59:23 PM

Title: How to make an object like an arrow point to the direction that it's moving to?
Post by: l3agu32 on October 29, 2015, 10:59:23 PM
I'm using Game maker studio. I have an object that is an arrow for an avoidance. How do I make the arrow point to the direction that it's moving to, for instance if it's moving down, the arrow should point down, if it's moving to the direction 220, the arrow should point to 220 as well, etc. To picture better what I'm trying to do, you can watch the gameplay of the game "I wanna be the bridge" on youtube and see how the arrows point exactly to the direction they're moving to. Thank you.
Title: Re: How to make an object like an arrow point to the direction that it's moving to?
Post by: infern0man1 on October 29, 2015, 11:11:27 PM
image_angle=[direction]

I recommend making the sprite centered in order for this to look decent at times.
Title: Re: How to make an object like an arrow point to the direction that it's moving to?
Post by: l3agu32 on October 29, 2015, 11:25:22 PM
image_angle=[direction]

I recommend making the sprite centered in order for this to look decent at times.

Thank you, now it's working how I wanted. And by sprite centered, do you mean the origin in the center of sprite?
Title: Re: How to make an object like an arrow point to the direction that it's moving to?
Post by: infern0man1 on October 29, 2015, 11:29:34 PM
Yes, and no problem. Good luck with your thingy ~(=^・ω・^)ノ