Interpolate bug .. or expected behaviour?
Sparkyidr
Member Posts: 2,033
Got a little issue with using interpolate to move an actor.
I have an interpolate to set an objects Y value to 50, ease out
and it works fine.
I then have a rule that says when a certain attribute is set to "leave", it then interpolates the Y value to 345 ease in
(it's a rocket that lands, and then takes off...looks really nice)
if I wait until the actor's Y is 50, and then set the attribute to leave, it works fine.
If I set the attribute to leave before the Y gets to 50 (I.E. before it has landed), it interpolates up to 345, but once there, it immediately flicks to Y=50 and stays there.
I'm assuming the first interpolate is still taking precedent over the 2nd? Or am I just being a bit silly, and have missed something obvious?
Sparks.
I have an interpolate to set an objects Y value to 50, ease out
and it works fine.
I then have a rule that says when a certain attribute is set to "leave", it then interpolates the Y value to 345 ease in
(it's a rocket that lands, and then takes off...looks really nice)
if I wait until the actor's Y is 50, and then set the attribute to leave, it works fine.
If I set the attribute to leave before the Y gets to 50 (I.E. before it has landed), it interpolates up to 345, but once there, it immediately flicks to Y=50 and stays there.
I'm assuming the first interpolate is still taking precedent over the 2nd? Or am I just being a bit silly, and have missed something obvious?
Sparks.
Comments
and it's just worked fine 2 times in a row.
I then quit the preview and started again.....and first time round, it didn't work again
Seems inconsistent.
EX)
`
when key "L" is down
interpolate game.number to 50
for 5 seconds
when key "K" is down
interpolate game.number to 10
for 2 seconds
`
if the second interpolate gets done with its funtction BEFORE the first one, then the first one will continue its interpolate.
So here is what it would look like:
Sec 1: L is pressed; interpolating to 50
Sec 2: K is pressed; interpolating to 10
Sec 3: Interpolating to 10
Sec 4: Interpolating to 10 is done, now interpolating to 50
Sec 5: interpolating to 50 is done.
I hope I helped a little.
~CTM
My interpolate "down" from 345 to 50 is set to 7 seconds
and my interpolate "up" back up to 345 was set to 1 second
When I have them both set to 7 seconds, it all works as expected.
Thanks for the info CTM, I will see if I can fudge some timing logic into what I am trying to do. /
When the y>343 I am contraining it to 345
This stops the initial interpolate from er...interpolating )
Seems to work ok, but probably needs a bit more testing
~CTM
but
1. It didn't look quite so "cool"
2. There seems to still be the bug that when the speed is set to more than 300, it sometimes doesn't stop ;o)