playMaker

Author Topic: Curve Float animation  (Read 4738 times)

logiquefloue

  • Playmaker Newbie
  • *
  • Posts: 35
Curve Float animation
« on: February 25, 2014, 03:54:48 AM »
Hello,
I want to animate a variable along a curve. I thought about using "curve float".
  I have two questions for you to help me:
1 / How do I know the value of my variable at time t? For example, my variable follows a curve 0s to 10s, how to know the value of the variable in 4s?
2 / In PlayMaker, I noticed that "Wrapping Mode"  curves do not have the "extrapolation" function unlike other software! Is this true in any unity?
Thank you for your help

logiquefloue

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Curve Float animation
« Reply #1 on: February 25, 2014, 04:04:56 AM »
I just found the answer to question No. 1. You must use "sample container" and not "float curve"
It's a shame that the mode "extrapolation" does not exist in unity curves  :(

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Curve Float animation
« Reply #2 on: February 25, 2014, 05:07:07 AM »
Hi,

 you can have extrapolation by simply adding the curve sampling to your owne variable, then the result is an ever extrapolation of the curve sampling ( if your curve goes up, the final value will keep going up as the curve loops on itself).

bye,

 Jean

logiquefloue

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Curve Float animation
« Reply #3 on: February 25, 2014, 05:45:06 AM »
I'm sorry Jean, but I did not understand your explanation ... add my curve to the variable?  ???

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Curve Float animation
« Reply #4 on: February 25, 2014, 07:15:20 AM »
Hi,

 actually, what would you expect from an extrapolation setting for curves?

 if my curve goes from 0 to 1 and Loop this, the value I get from it, let's call that variable "Curve sample" will always be between 0 and 1.

BUT, if I have another variable called "Result" that I add this "Curve sample"then the value will grow over time above 0.

at the end of the first loop for that curve, result will be 1, but at the end of the second loop, result will be 2.

does that make sense?

bye,

 Jean

logiquefloue

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Curve Float animation
« Reply #5 on: February 25, 2014, 09:40:12 AM »
I think you have not understood what I meant by "extrapolation".
image01 shows what makes the curve in Unity.
image02: the same extrapolated curve (as in Blender, Maya ...). after the last key (number 3 in my example) the continuous coube on the same trend.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Curve Float animation
« Reply #6 on: February 26, 2014, 01:19:25 PM »
Hi,

 ok, I see. then, I don't really see a way other then having a another curve of the same final slop that you would then work with when this curve ended.

bye,

 Jean