playMaker

Author Topic: Follow Player Problem: How to lock enemy to the ground? [SOLVED]  (Read 834 times)

Chris Vitorino

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Hello all,

I'm very new to Unity and playMaker, currently trying to build my first prototype game on it to hone my skills. I was doing great so far, but now I'm stuck in a problem that seems simple, but I could't find an answer online nor in this forum, so I seek your knowledge:

As you can see on the screenshots, I have an enemy detect the player presence and rush (with Move To and an easy) and follows the player (with Move Towards), all good, but when the player jumps, the enemy follows in the air, sometimes getting there for a few fractions of a second.

I want to lock the enemy to the ground so it never jumps with the player, but keep following. I tried some vector3 setups, but could't figure out the logic.

Please bear in mind I'm new to these tools, I'm more than happy to read or watch anything you can think would help me also. I read and watched a lot in the past few weeks, to get enough to get me started. I'm sorry if this is already answered around here, I searched for hours now, no luck, so I diceded to ask for help.



« Last Edit: August 08, 2015, 12:31:08 PM by Cristiano Vitorino »

mdotstrange

  • Hero Member
  • *****
  • Posts: 549
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Follow Player Problem: How to lock enemy to the ground?
« Reply #1 on: August 08, 2015, 08:21:44 AM »
Try checking the "ignore vertical" box on the Move towards action-

For these kind of behaviors you can also use the Navmesh system- if you use that your enemy will never leave the ground unless you set it up to jump
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Chris Vitorino

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Follow Player Problem: How to lock enemy to the ground?
« Reply #2 on: August 08, 2015, 08:59:53 AM »
Try checking the "ignore vertical" box on the Move towards action-

For these kind of behaviors you can also use the Navmesh system- if you use that your enemy will never leave the ground unless you set it up to jump

Thank you very much! That did it! But I had to disconnect Move To, I'll try to set it up differently. I'll also look into Navmesh. Thanks again!