Keeping Enemies on the ground?

Hey everybody, I have a quick question regarding actors. I have a main player who is controlled by the user. There are enemies in the game that constantly move to an x and y coordinate constrained by the position of the player. Essentially the enemies follow the actor around the map. The game is set up on a basic platformer template that I created with gravity and things like that. When the actor is on a hill and the enemy is down below the enemy takes the most direct path to the actor, which is by traveling in a diagonal line through the air and NOT on the ground like I want it to. How do I get the actor to stay on the ground rather than fly through the air? Accelerating the actor towards the ground as it tracks the player doesn't seem to work... I also want to know if there is a way that enemies can follow the actor into a building. Any ideas? Thanks so much!

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Without custom collision shapes, this is hard. This is the best I could come up with and while it "works," it's about as fun to set up as a long run of dominoes.

Answers

  • allc1865allc1865 Member, PRO Posts: 777
    That's a pretty cool template, @tatiang
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @allc1865 Thanks, but it's far from very useful as the invisible ground actors have to be positioned just so to get it to work at all, and often the enemy actor gets constrained below/above where it needs to be to look correct.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It looks like it deleted my attachment when you marked the post as answered (a forums bug that used to happen). I can re-upload it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here it is again.
  • Conifer_AppsConifer_Apps Member Posts: 100
    Thanks! I'll try it out.
Sign In or Register to comment.