playMaker

Author Topic: "Move To" Action not updating object's position when off screen.  (Read 2550 times)

Kubold

  • Full Member
  • ***
  • Posts: 112
"Move To" Action not updating object's position when off screen.
« on: February 11, 2013, 07:55:09 AM »
I want to make a chase scene in a sidescrolling game. I am controlling one character, and the other character is supposed to chase me (using Move To). If I run fast, the chaser stays behind and goes off screen. And then it freezes, and stops chasing me. If I go back, so it's on screen again, it unfreezes and chases me again.

The chaser is NOT a skinned mesh. It is just an empty object with capsule collider and a rigid body.

I guess Move To action doesn't update the object's translation if it's off screen? The other probable cause is that the rigid body, which is attached to the collider of this empty object, somehow freezes the whole thing, when it goes offscreen maybe?

How can I make it ALWAYS update?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: "Move To" Action not updating object's position when off screen.
« Reply #1 on: February 11, 2013, 02:24:41 PM »
Are you using Move Towards or iTween Move To?

AFAIK, neither one stops updating if an object is offscreen...

Do you have any other scripts or FSMs on the GameObject?

Kubold

  • Full Member
  • ***
  • Posts: 112
Re: "Move To" Action not updating object's position when off screen.
« Reply #2 on: February 12, 2013, 10:05:43 AM »
Thanks for quick reply!

I have no idea what was wrong before, but I rebuilt the chaser prefab from scratch and it helped.
If I see this problem again I'll bump this thread.

Thanks!