playMaker

Author Topic: Playmaker Wait + Float add inaccurate  (Read 1884 times)

QFGlenn

  • Playmaker Newbie
  • *
  • Posts: 30
Playmaker Wait + Float add inaccurate
« on: June 05, 2015, 06:31:51 PM »
Hi there, I am having an issue with the mathematics of Playmaker.
I wanted to move an object from [x y z](0,0,0) to (5.5 -12 3.5) smoothly within .125-.5 seconds.

I tried ease Vector and Ease Float. Both don't work. Either the model will jump, or the effects will not become apparent until a few states later (??? how could this even happen????)

So my solution was to use Float ADD and set position that way.

I made the wait time .125, and multiplied my 3 values by 4 (44,-96,28) and set them in the Float add action with every frame and per second checked. I also made the set position return every frame.

Mathematically this should return my 3 values, but the number is a little over, and not in increments I can mathmatically correct for. For example the value for x ended up being like 6.7 so subtracting from 5.5 multiplying by 4 and subtracting from x*2*2*2 still didn't correct my issue.


So is playmaker math inaccurate? Am I missing something? Oh finally let me just mention I tried using float clamps every frame and these did NOTHING it went over and under the max and min values.

Please help :<

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Playmaker Wait + Float add inaccurate
« Reply #1 on: June 09, 2015, 01:58:34 AM »
Hi,

 EaseFloat has a small glitch in the sense that the first frame will not set the float result to the start value, so make sure when you enter the state that you set the result float to the start value and it will fix the jumping ( will be addressed in the next PlayMaker release).

As for the inaccuracy in general, a repro would help cause indeed, therre should not be any of that. I suspect it's simply because you don't understand yet the mechanism behind switching states and when things happends during a frame.

a wait timer is unlikely going to give you accurate results because the state could be leaving when the timer ends before the mathematical action does its final computation.

 to solve this, I usually force the end value to be the one I expect to get rid of any potential accurary issue.

but, first I would go back to easefloat and try to make it work this way instead.Doing a custom animation system in PlayMaker is a fairly advanced topic.

Bye,

 Jean