I am trying to move an object in a curved path. Initially I have tried formulating the path by creating my own bezier curve, as shown below (yellow line is the target path, pink and red dots are the control points): However, I now believe it will be easier for me to create this path using Unity's built in Animation Curves. The reason being that I need to accelerate the body as it follows this path. So by using an Animation Curve, it should be easier to calculate the area under the curve to find the time of the motion. The problem I have is that Animation Curves appear to not allow this type of shape, i.e. where the end of the curve swoops outwards and back in before ending, kind of like a question mark. Please see below: Essentially I need the green line to be more like a question mark, as the yellow path does. The final point should be lower along the x-axis than the outer bulge, as shown in the rough sketch beside it. But if I try to drag the end point inwards, the curve reformats and becomes a real mess! Does anyone know if it is possible to create a curve like this? It seems like a pretty basic requirement.
I don't see it as a requirement. Think them as graphs. No graph goes back in time. You need a bezier waypoint solution. Maybe this one works for you. https://github.com/dbrizov/NaughtyBezierCurves
Hmm yes, that is a fair point! I suppose you're right when looking at it as a graph. I've tried to avoid using third party libraries since I prefer to write my own code, as I prefer to understand how everything works. In fact I am quite new to Unity and have never made use of extensions before. If I was to use the tool you provide, can I include it as part of my own released game? Or am I obliged to pay some kind of royalty? I realise this is more of a legal question vs. an animation one, but any pointers would be great.