Skip to content

Commit

Permalink
Merge pull request #89960 from Mknsri/fix/cylinder_face_edge_point_co…
Browse files Browse the repository at this point in the history
…llision

Fix separating axes for 3D cylinder-face collisions
  • Loading branch information
akien-mga committed Apr 4, 2024
2 parents 06f86e6 + 3f69af9 commit d604899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servers/physics_3d/godot_collision_solver_3d_sat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ static void _collision_cylinder_face(const GodotShape3D *p_a, const Transform3D

// Points of B, cylinder lateral surface.
for (int i = 0; i < 3; i++) {
const Vector3 &point = vertex[i];
const Vector3 point = vertex[i] - p_transform_a.origin;
Vector3 axis = Plane(cyl_axis).project(point).normalized();
if (axis.dot(normal) < 0.0) {
axis *= -1.0;
Expand Down

0 comments on commit d604899

Please sign in to comment.