Interpolation speed

MrSKYoneMrSKYone Member Posts: 26
edited August 2012 in Working with GS (Mac)
Hi,

Im try to make mutliple actors move at the same time with a same rule.
To explain a little bit, the game is like iCopter and I have a pipe composed of brick actors. I want them to move up and down continuously so it change the track the player has to drive in.

I made a timer rule saying that when an integer attributes X is set to 0, after 5 seconds, it sets it to 1
Another one saying that when X is set to 1, after 5 seconds it sets it to 0

Then I made 2 rules
When X = 1 ==> interpolate self.position.y to self.position.y+10
When X = 0 ==> interpolate self.position.y to self.position.y-10

It seems to work, even if the actors' y positions vary a little bit. My problem is in the interpolation speed and duration. It starts slowly, then it accelerate. I tryed all three options but it doesn't fix my problem. Couldn't we make it move at the same speed all the time? Cause when you set the duration to more than 2 seconds, it starts to twitch.

Thank you for any help you could provide.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    So if I understand, these actors move 10 pixels only in 5 seconds; when they reach their destination, they take another 5 seconds to move back 10 pixels? (It seems very slow, you'd hardly see them moving....)
Sign In or Register to comment.