how do i keep my actors line up always

guillefaceguilleface Member Posts: 1,014
edited November -1 in Working with GS (Mac)
i have actors moving back an forth,create a self attribute on the actor,
when self.move =1 change velocity to 0 degree
when self.move = 0 change velocity to degree 270
so rule when self.position x is less than or equal 15 change attribute self.move to 1
when self.position x is greater or equal to 305 change attribute self.move to 0
but after a while the actors are closer to each other, i set each individual position to be 7 pixels away from each but they don't keep that distance , any idea guys

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Hey,

    My guess is the change velocity is throwing it off a tiny bit depending on which direction it was moving last. You could use interpolate and that will solve your problem.

    Better yet if what your trying to do is have the 2 actors pace back and forth, check this video out

  • guillefaceguilleface Member Posts: 1,014
    i was using change velocity, so i changed to motion velocity x and set friction to 0 and still they get closer to each other or away, iam going try make a video i think thats better to see the problem
  • guillefaceguilleface Member Posts: 1,014
    also my actor is a space ship in triangle shape, so iam thinking thats the problem by having rectangle shape, if the width is 26 so the middle point still 13?
Sign In or Register to comment.