#How to fix Path3D tilt smoothing
1 messages · Page 1 of 1 (latest)
Ok I solved my problem by changing godot's Curve class using smooth step and some other things to have a smooth value per point.
const auto smooth = Math::smoothstep(0.0f, 1.0f, E.key);
if (E.key >= 0.5f) { // Point B
btw[pidx] = Math::lerp(points[i].tilt, points[i + 1].tilt, Math::lerp(E.key, smooth, points[i + 1].smoothness));
}
else { // Point A
btw[pidx] = Math::lerp(points[i].tilt, points[i + 1].tilt, Math::lerp(E.key, smooth, points[i].smoothness));
}
How to fix Path3D tilt smoothing
Without the smoothing.