interpolate rotation prob
Sparkyidr
Member Posts: 2,033
Just loaded my current project into 0.9, and had a small prob
I have set of rules to make a little "wobble" happen
I interpolate self.rotation to 5
then have 2 rules that say
when self.rotation is 5
---interpolate self.rotation to -5
when self.rotation is -5
---interpolate self.rotation to 5
This works around 40-50% of the time, but the rest of the time, craps out, as when the rotation should be hitting -5, it's hitting 350 (which is the same angle as -5)
I can get it to work 100% of the time, by changing the angle in the rule to 4.99 and -4.99 though.
bug? or rubbish rules?
I have set of rules to make a little "wobble" happen
I interpolate self.rotation to 5
then have 2 rules that say
when self.rotation is 5
---interpolate self.rotation to -5
when self.rotation is -5
---interpolate self.rotation to 5
This works around 40-50% of the time, but the rest of the time, craps out, as when the rotation should be hitting -5, it's hitting 350 (which is the same angle as -5)
I can get it to work 100% of the time, by changing the angle in the rule to 4.99 and -4.99 though.
bug? or rubbish rules?
Comments
For example if self.position.x is 240, it will only go to about 200 or 220ish sometimes.
I changed it to 4.99 instead of 5 as above, and this makes it pretty robust.
Only fails around 1-2% of the time (not ideal, but liveable with at this moment in time) in the viewer.
BUT
I did a dev build...and it's failing like 70% of the time in the native app!!!!!
Anyone know what I am doing wrong here (if anything), as I am about to ditch it, and do it via animation (