-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rshapes] Fix multisegment Bezier splines. #3744
base: master
Are you sure you want to change the base?
Conversation
It seems to me that these functions are wrong, if you step the index by 1 you move to a control point instead of the next segment.
@spelufo Did you test it? Could you share some code example? |
I did, through raylib-go:
|
@spelufo I'm trying this fix with example Drawing code I'm using: Vector2 fullPoints[14] = {
points[0],
control[0].end,
control[1].start,
points[1],
control[1].end,
control[2].start,
points[2],
control[2].end,
control[3].start,
points[3],
control[3].end,
control[4].start,
points[4],
control[4].end
};
DrawSplineBezierCubic(fullPoints, 14, splineThickness, RED); The expected result is: |
I've fixed the example code. I tested that the previous version of |
Regarding the "connections", the gaps left on the points between segments, one way to cover them up would be to have |
I've gone ahead and did that. It is ready to merge if you want. |
@raysan5 ? |
@spelufo Excuse the late response! I'm quite busy lately... I want to review this code more carefully because I think the current |
It seems to me that these functions are wrong, if you step the index by 1 you move to a control point instead of the next segment.