Search Unity

How do you create Animation Curve?

Discussion in '2D' started by MeButFrustrated, Jan 18, 2022.

  1. MeButFrustrated

    MeButFrustrated

    Joined:
    Jan 3, 2022
    Posts:
    1
    I need an Animation Curve in Unity 2D so i can make an engine torque curve, take the values at se RPM and then apply the torque to that engine. And then take the RPM and make an automatic transmission to shift at some RPM.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    Code (csharp):
    1. public AnimationCurve MyCurve;
    Now go look at the docs for it to see how to use it, or look at any number of youtube tutorials.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,450
    So you know, nothing you've asked here is 2D. AnimationCurve isn't a specific 2D thing and is part of the animation system and there's a sub-forum for it here. Failing that, there's also a scripting sub-forum here.

    Side note: Unity 2D doesn't exist. ;)