Skip to content
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

SplineMeshTiling direction bug #48

Closed
programming2012 opened this issue Aug 9, 2021 · 4 comments
Closed

SplineMeshTiling direction bug #48

programming2012 opened this issue Aug 9, 2021 · 4 comments

Comments

@programming2012
Copy link

Hi
I am using SplineMeshTiling.
There are two nodes on Spline. The fields of Element 0 are: Position(0,0,0), Direction(0,0,0). The flelds of Element 1 are: Position(0,-10,0), Direction(0,-10,0).
And then i add Mesh and Material to SplineMeshTiling. You can see something wrong on the Element 0.
If you set Direction of Element 0 to (0,-1,0). The Mesh rendering is correct.
Thanks.

@methusalah
Copy link
Owner

"Direction" may be confusing, as this vector is really the control point of the curve, in Cubic Bezier Curve vocabulary. This mean the actual direction vector is the vector going from Position to Direction. Therefore, if you have the same value in Position and Direction, there is no direction at all and the result will be wrong.

Note that the vector [Direction - Position] gives the direction of the curve, and its magnitude gives the strength of the curvature.

@programming2012
Copy link
Author

"Direction" may be confusing, as this vector is really the control point of the curve, in Cubic Bezier Curve vocabulary. This mean the actual direction vector is the vector going from Position to Direction. Therefore, if you have the same value in Position and Direction, there is no direction at all and the result will be wrong.

Note that the vector [Direction - Position] gives the direction of the curve, and its magnitude gives the strength of the curvature.

Thank you very much for your reply.
In this sample, if the position and direction is same, Can it be understood that this is not a Bezier Curve, but a Line segment. From the point of view of code implementation, is this feasible? Just like I have a telephone pole, it is vertical, like a line segment.
Thanks.

@methusalah
Copy link
Owner

methusalah commented Aug 9, 2021 via email

@programming2012
Copy link
Author

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants