-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Curve 3D up vectors are pre-calculated and hard to control #47445
Comments
I have experienced this recently on 3.4b4, and even forcing tilt to zero does not make any difference (plus, path visual controls and curve resource structure do not help in anything to solve it). |
I was trying to figure out if I was missing some thing with curves and defining up vectors and found this. Being able to specify the up vector at each control point would be great! My hacky workaround is to add another curve, then get the closest point on that other curve from the point on the main curve and use that as my up vector. |
Tested locally and it seems to do what I need! |
I believe #80329 has fixed this? |
Closing per @fire's comment. |
Related Issues: #27137
Godot version: 3.2.3
OS/device including version: Windows 10, GLES3, Intel Integrated Graphics
Issue description:
What I expect: I can edit a Curve 3d and manually adjust how it twists using the "tilt" property of the curve points.
What I get: Not only am I unable to set the "tilt" property through an editor gizmo, but the editor already is tilting the path when calculating up vectors.
Checking the
up_vector_enabled
property of Curve3D is required for using up vectors (such as setting the PathFollower3D rotation mode to ORIENTED, which as per this is the ONLY working rotation mode right now...). However, When checking the up_vector_enabled property on the Curve3D, it will automatically create a set of up vectors for the curve using an algorithm from line 1238-1278 of curve.cpp in the source code.This hidden behind-the-scenes nature of precomputing the up-vectors makes it impossible for a user to accurately build a
twisting curve to his or her specifications. If a user wanted to change the way the path twists, they would be adding in tilt values to attempt to correct for the algorithm (which can get messy very fast, especially considering how tilts are not visible in editor).
Steps to reproduce:
Make a Path 3D
Make sure
up_vector_enabled
is enabledAdd some points with bezier curves
Add a Pathfollower 3D in Oriented Rotation mode and observe its wacky rotations. Adding a camera to the Pathfollower will help highlight this.
Scream in pain as the path twists for you and you can't do anything about it.
Minimal reproduction project:
Here's a generic example of how it works. Notice that the algorithm leaves me slanted in the end without correcting it.
The main issue is that tilt was made without my input and I would have to add "tilt" values to correct it - not to form it.
test_rail.zip
Edit: It looks like this is "intended" behavior as per the docs, but with tilts and up_vectors being invisible in editor, it's difficult to control.
The text was updated successfully, but these errors were encountered: