constrained Actor

When actor1 is constrained to actor2 when they move only actor2 can tell that its moving. does anyone know a work around for this?

Comments

  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    Please explain a little more or else people will just skip this.
  • ericzingelerericzingeler Member Posts: 334
    edited July 2013
    @polimerjones

    This is because constraining to a position is not actually moving, but instead changing the position coordinates at a very fast rate.

    Do this instead:

    constrain actor1.motionLinearVelocityX to (actor2.posX - actor1.posX)*20
    constrain actor1.motionLinearVelocityY to (actor2.posY - actor1.posY)*20

    Note: make 20 higher for more responsive, or less for less responsive
  • polimerjonespolimerjones Member Posts: 50
    Thanks i will try this
Sign In or Register to comment.