motion actor from point A to point B

I would like to move an actor from point A to point B
when it gets to the point B that I would like to swing from a little bit
without putting a wall actor

I did some tests with
1 - interpolate (self.position.X)
2 - accelerated toward (a little bit swing but as I stop him?)
3 - change attribute (self.motion.linear.velocity.X)
4 - move to

I attach a demo
https://www.dropbox.com/s/ickvilrv3iwoxk5/motion_linear.gameproj.zip

thanks for your attention and help

Comments

  • DuesDues Member Posts: 1,159
    edited August 2013
    What do you mean by "swing from a little bit" do you want it to go to position X and then a little bit back?
  • wolltywollty Member Posts: 102
    yes

    arrives at the X position and swings a little
    sorry for my bad english

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    If you are talking about bouncing back a little, try this from the "spare code" thread.
    http://forums.gamesalad.com/discussion/comment/404317/#Comment_404317
  • wolltywollty Member Posts: 102
    how can i make to stop an actor with behavior accelerate toward
    I tried to put a boolean attribute
    and a change attribute
    self.motion.linear.velocity.X = 0
    but does not work correctly

    without putting an invisible wall

    thanks
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    Accelerate is a 'persistent' behavior. It will always keep accelerating. To get it to stop accelerating you would need to put the behavior is a rule like this:

    When self.Position.X < 400
    --Accelerate Toward ____ ____
    Otherwise
    --Change Attribute self.motion.linear velocity.X To 0
    --Change Attribute self.motion.linear velocity.Y To 0
  • wolltywollty Member Posts: 102
    I'll do a bit test

    thanks
Sign In or Register to comment.