I’ve spent some time trying to work out how to achieve the following but I am unsure of how to proceed.
Please see the attached image
Currently I am getting a bezier weighted on the anchor point x however the line does’t appear to be perpendicular. On top of that when the vector between the two points is facing some directions x is calculated on top of or behind the starting vector.
Uhm your calculations is correct. So “perp” is a relative direction vector that is perpendicular to the direction between your two points. However it’s not clear what the actual problem is. Note there are different kind of bezier curves (quadratic, cubic or higher order). Also depending on the used equation you may need to use a tangent vector instead of a control point position. Why don’t you should your actual code?