소스 검색

Fixed bug where soft bodies would collide with sensors as if they were normal bodies

Fixes #877
Jorrit Rouwe 1 년 전
부모
커밋
0f3597856e
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Docs/ReleaseNotes.md
  2. 1 0
      Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp

+ 1 - 0
Docs/ReleaseNotes.md

@@ -25,6 +25,7 @@ For breaking API changes see [this document](https://github.com/jrouwe/JoltPhysi
 
 ### Bug fixes
 * Fixed bug in soft body vs tapered capsule. The calculations were slightly off causing a normal on the top or bottom sphere to be returned while the tapered part was actually closest.
+* Fixed bug where soft bodies would collide with sensors as if they were normal bodies.
 * Sensors will no longer use speculative contacts, so will no longer report contacts before an actual contact is detected.
 * Hinge limit constraint forces were clamped wrongly when the hinge was exactly at the minimum limit, making it harder to push the hinge towards the maximum limit.
 * Fixed bug when a body with limited DOFs collides with static. If the resulting contact had an infinite effective mass, we would divide by zero and crash.

+ 1 - 0
Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp

@@ -113,6 +113,7 @@ void SoftBodyMotionProperties::DetermineCollidingShapes(const SoftBodyUpdateCont
 			{
 				const Body &body = lock.GetBody();
 				if (body.IsRigidBody() // TODO: We should support soft body vs soft body
+					&& !body.IsSensor()
 					&& mSoftBody.GetCollisionGroup().CanCollide(body.GetCollisionGroup()))
 				{
 					CollidingShape cs;