Posts: 3
Threads: 1
Joined: Aug 2021
Hello, I am trying to figure out how to have a bezier curve be generated based on two control points angles/direction given by the user. The image below basically gives a rough idea of what I'm trying to go for.
I see that auto handle creates nice smooth curves, so is there a way to allow certain directions the control points have to face?
Any suggestions would be great
Posts: 2,110
Threads: 92
Joined: Jun 2017
Hi
I think you should set Auto Handles to false, and then set the handles like in the picture you posted. Try first doing that via the editor, and if it gives good results, then you can try generating the handles' direction, based on the angle, via the API
Did that help?
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 3
Threads: 1
Joined: Aug 2021
Yeah, I think the problem I'm having specifically would be generating the handles in the specific direction where the bezier curve also creates a realistic path, because I was going to have a vehicle follow it. I think the math/idea might be way too complex, so I'm probably just gonna let the user manually move the handles to their desire angles/location. Thanks for the help, I will let you know if I make any breakthroughs!
Posts: 2,110
Threads: 92
Joined: Jun 2017
If you inputs are the angles (30°, 180°, ...) then finding the direction of the handles is easy: x = sin(angle) and y = cos(angle). Then comes the question of the ideal length of the handles. For that I don't have an answer
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.