playMaker

Author Topic: Move towards and finish event problem [Solved]  (Read 3004 times)

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Move towards and finish event problem [Solved]
« on: December 10, 2012, 10:31:51 PM »
Hi,

in my game i need to move npc ( animation material with rigidbody) its in 2d. i only move them on X axis.

i use move towards action, and tick [Ignore vertical] bool. but it make my character never trigger the finish event, it work if i dont use  ignore vertical, but my character is not affected by gravity then.
is there a way to correct this action? finish event can ignore vertical too?

« Last Edit: December 10, 2012, 11:54:09 PM by PIXELCRY »

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Move towards and finish event problem
« Reply #1 on: December 10, 2012, 11:53:35 PM »
oh finally my problem solved by adding some offset in the position and add a finish distance value, its a bit tricky but it work

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Move towards and finish event problem [Solved]
« Reply #2 on: April 21, 2020, 06:28:14 PM »
8 years later (sorry) but just noticed the same issue and not sure if it's a bug or intentional logic that I'm not understanding. If I have the 'Finish Distance' set to 0. (ie I want it to move all the way to my exact coordinates and then 'finish'), the finish event never fires and it gets stuck on this state.

Setting that 'Finish Distance' to anything >0 (eg 0.0001) allows the finish event to fire.  But this means my object never precisely hits the point I need.

I can work around it, but curious to know if this is a bug. Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move towards and finish event problem [Solved]
« Reply #3 on: April 22, 2020, 02:15:40 AM »
Hi,
 
this is not a bug no, usually, the imprecision is fine for 99% of the cases, what I do when I want a precise end position, I have the next state following that action to position exactly the object to the target position, that's it.

Bye,

 Jean