Fix Path2D fish bone direction

This commit is contained in:
Yaohua Xiong 2022-12-06 20:45:17 +08:00
parent 43e9ca40ff
commit 322dbd0955
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ void Path2D::_notification(int p_what) {
Transform2D *w = frames.ptrw();
for (int i = 0; i < sample_count; i++) {
w[i] = curve->sample_baked_with_rotation(i * interval, true);
w[i] = curve->sample_baked_with_rotation(i * interval, false);
}
}

View File

@ -941,7 +941,7 @@ Transform2D Curve2D::_sample_posture(Interval p_interval) const {
const Vector2 forward = forward_begin.slerp(forward_end, frac).normalized();
const Vector2 side = Vector2(-forward.y, forward.x);
return Transform2D(forward, side, Vector2(0.0, 0.0));
return Transform2D(side, forward, Vector2(0.0, 0.0));
}
Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {