added epsilon value to linear constraint check
This commit is contained in:
parent
0704378f1a
commit
1a822754b3
|
@ -45,7 +45,7 @@ int _internal_default_contact_solver(RigidBody* body, Contact* contact, Transfor
|
|||
Transform* trans = rigidbody_get_transform(body);
|
||||
const Vector world_collision_point = vaddf(transform_point(&pre_solve, hit.point), hit.penetration_vector);
|
||||
const float current_dot = vdotf(hit.normal, vsubf(transform_point(trans, hit.point), world_collision_point));
|
||||
if(current_dot >= 0.0)
|
||||
if(current_dot >= -0.0001)
|
||||
return 1;
|
||||
// the desired position is anywhere the overlapping vertex is further along the normal than the contact point
|
||||
const Vector target = vaddf(trans->position, vmulff(hit.normal, -current_dot));
|
||||
|
|
Loading…
Reference in a new issue