playMaker

Author Topic: Animation Curve  (Read 2233 times)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Animation Curve
« on: March 24, 2020, 04:31:55 AM »
Hi,
I have movement patterns for different objects and move them with the 'animate float action' using animation curve, but I can't figure out how to set different curves as I don't see a way to create animationcurve variables.

Is there a way to do this? Can I get values from an animation curve variable in some way using Playmaker? Or do I need to create a custom animate float action that reads from an attached script which contain the variable?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Animation Curve
« Reply #1 on: March 24, 2020, 04:57:01 AM »
Hi,
Click on the box next to Anim Curve, it should open curve window.

then click on the gear :



Tip Right Click cue points to edit keys (set values by number)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: Animation Curve
« Reply #2 on: March 24, 2020, 05:29:14 AM »
Hmm, maybe I wasn't clear. I need to read animation curves I created on other objects/FSMs.

To be exact, I have a fishing mini-game. Each fish has it's own moving pattern(animation curve) that I defined on the data object for each fish. So the mini-game manager need to read this curve so it can behave correctly depending on which fish was caught.

Does that make more sense?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Animation Curve
« Reply #3 on: March 24, 2020, 08:16:47 AM »
Hi.
i am not sure if you can directly acces the curve.

but maybe you can use a int on the fish as an 'ID' so you know which fish it is and then you could also get the current float value of the curve from the fish.

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: Animation Curve
« Reply #4 on: March 24, 2020, 12:27:55 PM »
Thanks, I know a few way to "work around" it - but it's just making it more messy with special case data all over the places.

Is there a reason Playmaker can't support animationcurve variables? Unity has it and there is even c# FSM variable for it (I saw another thread where it was requested as well).

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Animation Curve
« Reply #5 on: March 24, 2020, 12:54:15 PM »
Hi.
I did not say Playmaker can't support it :)

But i am not sure if you can get the curve directly from that action. to know which curve is used.

I will ping jean if he has an idea.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Animation Curve
« Reply #6 on: March 25, 2020, 05:07:14 AM »
Hi,

 yes, that's a tricky one, because Unity AnimationCurve are not Unity objects per say, and PlayMaker fsmObject variable only support actual Unity Objects.

The only way would be to hardcode a new FsmVariable, like we have for string, vector, float, int, etc etc.

Bye,

 Jean

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Animation Curve
« Reply #7 on: March 04, 2022, 01:10:54 PM »
Hello,
just asking if animationCurves as variable is planed ?