Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Bezier curve animation

Discussion in 'Animation' started by MichelTardis, Oct 17, 2018.

  1. MichelTardis

    MichelTardis

    Joined:
    Dec 3, 2014
    Posts:
    3
    Hi I want to know how can I design an animation which use a bezier curve for value interpolation? I checked the AnimationCurve but it does not allow me to add some control points to form a bezier curve. What I want to do is to create some custom animation which is controlled by a bezier curve like on android platform. If someone knows the way, please tell me. Thanks in advance!
     
  2. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    822
    Maybe, I misunderstood your problem... But, you can add points to and Animation Curve. Just double click on the curve and a control point will be added.
     
  3. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,041
    Yes, the AnimationCurve class is essentially a Bezier curve, with all the options that implies. You can adjust the handles for individual points on the curve, make them hard stops instead of smooth. You can even create and edit an animation curve through programming. (I've done this in the past for some of my projects, and it worked like a charm) The visual editing in the Unity interface should allow you to do whatever you want as far as manually editing the curve is concerned. Poke at it a little and you should find what you need.
     
  4. MichelTardis

    MichelTardis

    Joined:
    Dec 3, 2014
    Posts:
    3
    I tried editing control points of AnimationCurve, but it did not work as I expected. What I want is to use a curve like this:http://cubic-bezier.com/#.17,.67,.83,.67

    Thanks for your reply, finally I solved this problem by writing the curve in the script.