Merge pull request #72107 from rburing/separation_ray_normal
Fix separation ray normal direction
This commit is contained in:
commit
dfb824c1d1
@ -127,11 +127,10 @@ bool GodotCollisionSolver3D::solve_separation_ray(const GodotShape3D *p_shape_A,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p_result_callback) {
|
if (p_result_callback) {
|
||||||
if (p_swap_result) {
|
|
||||||
Vector3 normal = (support_B - support_A).normalized();
|
Vector3 normal = (support_B - support_A).normalized();
|
||||||
p_result_callback(support_B, 0, support_A, 0, normal, p_userdata);
|
if (p_swap_result) {
|
||||||
|
p_result_callback(support_B, 0, support_A, 0, -normal, p_userdata);
|
||||||
} else {
|
} else {
|
||||||
Vector3 normal = (support_A - support_B).normalized();
|
|
||||||
p_result_callback(support_A, 0, support_B, 0, normal, p_userdata);
|
p_result_callback(support_A, 0, support_B, 0, normal, p_userdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user