playMaker

Author Topic: Move object while respecting collisions  (Read 287 times)

nickg84

  • Playmaker Newbie
  • *
  • Posts: 9
Move object while respecting collisions
« on: June 12, 2024, 01:05:34 PM »
Hello,

I'd like my player to move forward a bit when attacking.  Currently, I'm getting the results I need from 'Move Object' and a target position just in front of the player.  However, I noticed this ignores collisions.

Is there an action that essentially does exactly this while respecting collision detection?  I've tried Move Towards (and Advanced from the Ecosystem) but can't get those to work properly for some reason.  Not sure if it's because my player is a prefab, so his target is a child of this prefab?

nickg84

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Move object while respecting collisions
« Reply #1 on: June 13, 2024, 01:41:44 PM »
Sorry for the traffic -- I think I figured something out, and posting it here in case it helps others.  I really should've been using 'Move Towards Advanced' (from the Ecosystem) with Fixed Update.  And instead of moving the player towards an empty target, I instead used a Game Object as the target (saved from a Collide Tag within a trigger zone, aka the enemy within range).  And now.... works perfectly, along with Look At.