change bullet relative velocity sign to match ubOde

LSLKeyTest
UbitUmarov 2016-07-25 01:07:19 +01:00
parent 76239602b4
commit e60dc305a4
1 changed files with 1 additions and 1 deletions

View File

@ -508,7 +508,7 @@ public abstract class BSPhysObject : PhysicsActor
relvel = RawVelocity; relvel = RawVelocity;
if (collidee != null && collidee.IsPhysical) if (collidee != null && collidee.IsPhysical)
relvel -= collidee.RawVelocity; relvel -= collidee.RawVelocity;
newContact.RelativeSpeed = OMV.Vector3.Dot(relvel, contactNormal); newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal);
// DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}", // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}",
// LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed); // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed);