Author Topic: How to make an object like an arrow point to the direction that it's moving to?  (Read 2241 times)

l3agu32

  • Wannabe
  • Posts: 22
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
  • Playstyle: Keyboard
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.

infern0man1

  • ~(=^・ω・^)ψ
  • Global Moderator
  • Oatmeal Killer
  • Posts: 1.021
  • Dear sir stroke madam, fire exclamation point
  • OS:
  • Android 4.4.2 Android 4.4.2
  • Browser:
  • Chrome 46.0.2490.76 Chrome 46.0.2490.76
    • View Profile
    • Twitter
  • Playstyle: Keyboard
image_angle=[direction]

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

l3agu32

  • Wannabe
  • Posts: 22
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
  • Playstyle: Keyboard
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?

infern0man1

  • ~(=^・ω・^)ψ
  • Global Moderator
  • Oatmeal Killer
  • Posts: 1.021
  • Dear sir stroke madam, fire exclamation point
  • OS:
  • Android 4.4.2 Android 4.4.2
  • Browser:
  • Chrome 46.0.2490.76 Chrome 46.0.2490.76
    • View Profile
    • Twitter
  • Playstyle: Keyboard
Yes, and no problem. Good luck with your thingy ~(=^・ω・^)ノ