fix: bounding box calculation in aabb-aabb collision
parent
19d15fa2a3
commit
60c320fb10
|
@ -95,7 +95,7 @@ bool CollisionShape::overlap_aabb_aabb(ShapeAABB lhs, Transform lhst, ShapeAABB
|
|||
std::abs((lhst.position.y - lhs.v_extent) - (rhst.position.y + rhs.v_extent)),
|
||||
lhs.v_extent, rhs.v_extent
|
||||
})};
|
||||
return bound_x < (lhs.h_extent + rhs.h_extent) || bound_y < (lhs.v_extent + rhs.v_extent);
|
||||
return bound_x < (lhs.h_extent + rhs.h_extent) && bound_y < (lhs.v_extent + rhs.v_extent);
|
||||
}
|
||||
|
||||
CollidableNode *CollisionShape::get_owner() const {
|
||||
|
|
Loading…
Reference in New Issue