playMaker

Author Topic: curve instead of math float operator [SOLVED]  (Read 1398 times)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
curve instead of math float operator [SOLVED]
« on: January 17, 2020, 10:05:59 PM »
Hello,
I need a float coming from a [0; 1] slider value to go through a math function (a curve) in order to get a other float ranging from other min & max values with possibility of non linear interpolation (ease in / out ...).
So i'd like a kind of "float math from curve" Action.
I'm sure you all do that all the time ! How do you do that guys ?
Thanks a  lot
Please excuse my English ;-)
PS : for now I use a "float operator" and "float add" Action ...
« Last Edit: January 27, 2020, 01:03:41 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: curve instead of math float operator
« Reply #1 on: January 18, 2020, 11:18:31 PM »
Hi,
The Tween beta actions have a tween float where you can use curves :

https://hutonggames.fogbugz.com/f/page?W1714


i have been using them many times already and so far the actions are very stable (and will probably come out of beta on the next update, but you can use them now already)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: curve instead of math float operator
« Reply #2 on: January 20, 2020, 07:34:44 PM »
Tanks djaydino !
I will try that :-)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: curve instead of math float operator
« Reply #3 on: January 21, 2020, 08:52:05 PM »
Hi,
"Tween Float" animates floats right ? I dont want to animate :-)
- What i do now :
slider -> float value -> several (Math) float add/multiply ... -> Set property
But i need a complexe math operation ... and using a curve would be so simple !
So what i'd like to do :
slider -> float value -> curve (math function) -> Set property

Is there an Action that can apply a curve (math function) to a float ?
Thank you :-)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: curve instead of math float operator
« Reply #4 on: January 22, 2020, 08:20:52 AM »
Hi,

 yes, you can try CurveFloat, AnimateFloat or sampleCurve.

Try them all, and see which ones fits better your needs.

Bye,

 Jean

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: curve instead of math float operator
« Reply #5 on: January 23, 2020, 01:13:03 PM »
Hi Jean Thanks :-)
Yes !!!
I need the abscissa to be a slider value (not time) and the ordinate to be an other float variable.
The "sample Curve" Action is definitively what I need !
Thanks
Bye