Move To issue

I have set up an attribute to trigger a MOVE TO behavior. When trigger is "1" Move actor to set destination (simple right?).

When I preview the action half the time the function works. The rest of the time the actor moves beyond the set location.

How can I make the actor move to a certain location every time the trigger is set at "1"?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Do you have run to completion checked? Also an actors position is based off it's center not the edges. You need to take into account the distance from center out. You can also make a rule that stops the velocity at the spot.

    Rule

    When trigger is 1

    Move to

    X 256. Y 300

    Rule (inside above rule)

    (on the direction you may want to use "equal to or greater than" or "equal to or less than" this will account for decimal places, so if the location is 256.01 moving right it will stop it.)


    When self.position X = 256. When self.position Y = 300

    Constrain attribute self.motion.linear velocity X to 0

    Constrain attribute self.motion.linear velocity Y to 0
  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2014
    @naydi001
    .How can I make the actor move to a certain location every time the trigger is set at "1"?
    Just use interpolate instead, interpolate won't overshoot.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Interpolate is fine unless you want collisions. Interpolate will override collisions as it's a brut force move. Each has it's place depending on what one is looking to accomplish. If you don't need collisions between the move then interpolate is much more accurate.
Sign In or Register to comment.