Godot: PathFollow 3D erratic rotations

Created on 15 Feb 2016  路  12Comments  路  Source: godotengine/godot

The object following pathfollow offset gets weird and erratic rotations but only on the first loop/lap. Tested on beta and RC 2.0 on linux systems.

Simple test inluded to confirm the issue.
followcurvetest.zip

bug confirmed core

Most helpful comment

Godot 3.1 official.
Windows 10 x64

Closing the curve doesn't actually "Close" the curve, but instead places another point at the start point.
This causes the anchors to be seperate and unable to use the "Mirror Handles" options.
The main issue though is it causes a noticeable rotation jitter.
https://youtu.be/-4zX-wWV_L8

All 12 comments

Does this happen with the current master branch?

Using a build like a week old, the motion is similar to the original one, 3 points on the right side have a small "shake" when turning.

Here is the project for master:
curvetestv3.zip

That's not a bug in pathfollow3d. It's working as expected, following the tangent of the curve. If the curve tangent isn't smooth (as in the attached project), you'll get "erratic rotations".

The curve class can be changed to guarantee smooth derivatives/gradients or some helper could be added to the UI to guarantee that the tangent manifold is smooth maybe, but it's a lot work work for little gain. I'd just be careful when designing curves.

I know you can't really see the torsion on the UI but you can try to be extra careful about making it smooth

Well, I have just tested the sample project in both versions and that is what appears to be the problem mentioned in the OP, so you say that is an issue on the curve design then?

Too bad there is not possible to see the points on the inspector for fine tuning...

You can see the points and the curve itself quite well if you zoom in, but what matters is the torsion of the curve which is the second derivative.

Roughly speaking, if you see kinks or "sudden" changes in your curve when you zoom in, that's a bad sign.

Again, introducing a new type of curve based on a different type of polynomial which makes in hard to introduce large gradient changes would be a solution.

I'm on Godot v3.0.5 stable.
PathFollow2D rotation seems to be working properly.
PathFollow (3D) rotation is not working properly.
The behavior that I expect is that the rotation is perpendicular to the curve.
And the same offset would always produce the same rotation.
That is how PathFollow2D seems to work.

#14321 seemed to have fixed it for 2D.
Could 3D get the same treatment?

EDIT: Sorry this might have been a bit off topic for this particular issue but the issue I see with PathFollow (3D) is the same that was discussed for PathFollow2D here #13434.

same with master build.
PathFollow node loop will result strange rotate.
I replace with OrientedPathFollow node,and it is work fine

Godot 3.1 official.
Windows 10 x64

I created a Path (3D) in capsule form and made a mesh move over it, using PathFollow.
The mesh has absolutely no rotation.
However, as you can see in the image, the mesh appears slightly rotated.
I do not know what causes this.
Any idea?

Godot 3.1 official.
Windows 10 x64

Closing the curve doesn't actually "Close" the curve, but instead places another point at the start point.
This causes the anchors to be seperate and unable to use the "Mirror Handles" options.
The main issue though is it causes a noticeable rotation jitter.
https://youtu.be/-4zX-wWV_L8

This bug report seems to be still valid due to the duplicate reported in #36258, but it needs an updated minimal reproduction project. Neither of the two projects posted above work in Godot 3.2.2.

This is a fixed example tested on 3.2.2beta4, the body glitches on turns and after one loop the rotation breaks completely.

curvetestv322.zip

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducdetronquito picture ducdetronquito  路  3Comments

SleepProgger picture SleepProgger  路  3Comments

mefihl picture mefihl  路  3Comments

RebelliousX picture RebelliousX  路  3Comments

Zylann picture Zylann  路  3Comments