mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
BulletSim: pass up and report the real collision penetration.
This commit is contained in:
@@ -130,6 +130,7 @@ public struct CollisionDesc
|
||||
public uint bID;
|
||||
public Vector3 point;
|
||||
public Vector3 normal;
|
||||
public float penetration;
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct EntityProperties
|
||||
|
||||
@@ -557,8 +557,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||
uint cB = m_collisionArray[ii].bID;
|
||||
Vector3 point = m_collisionArray[ii].point;
|
||||
Vector3 normal = m_collisionArray[ii].normal;
|
||||
SendCollision(cA, cB, point, normal, 0.01f);
|
||||
SendCollision(cB, cA, point, -normal, 0.01f);
|
||||
float penetration = m_collisionArray[ii].penetration;
|
||||
SendCollision(cA, cB, point, normal, penetration);
|
||||
SendCollision(cB, cA, point, -normal, penetration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user