• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM How to make an object match the angle its currently on?

G

GalaxyKitten

Guest
Hi there, I currently have an enemy that sticks to walls. When a corner approaches, it will change its degree to 90 degrees to match that.

Imagine a box, the enemy will crawl all around it, up the walls, upside down, nice and good! But when it reaches a slope, it goes crazy because it tries to flip 90 degrees on a 45 degree angle for example. What would be the best way for it to just match the slope or angle its currently on?

My Code: https://pastebin.com/raw/kUDx4hMb

Thank you!
 
Top