* Preliminary work with the ODEPlugin to collect collision data.

This commit is contained in:
Teravus Ovares
2008-03-14 05:22:52 +00:00
parent 94c39c793a
commit abacfba287
9 changed files with 196 additions and 18 deletions

View File

@@ -545,6 +545,9 @@ namespace OpenSim.Region.Environment.Scenes
new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
dupe.RootPart.PhysActor.IsPhysical);
dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId;
dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
}
// Now we've made a copy that replaces this one, we need to

View File

@@ -785,7 +785,7 @@ namespace OpenSim.Region.Environment.Scenes
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
new Quaternion(RotationOffset.W, RotationOffset.X,
RotationOffset.Y, RotationOffset.Z), RigidBody);
PhysActor.LocalID = LocalId;
DoPhysicsPropertyUpdate(RigidBody, true);
}
@@ -1305,6 +1305,7 @@ namespace OpenSim.Region.Environment.Scenes
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
new Quaternion(RotationOffset.W, RotationOffset.X,
RotationOffset.Y, RotationOffset.Z), usePhysics);
PhysActor.LocalID = LocalId;
DoPhysicsPropertyUpdate(usePhysics, true);
}
else

View File

@@ -1809,6 +1809,7 @@ namespace OpenSim.Region.Environment.Scenes
}
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
m_physicsActor.LocalID = LocalId;
}
// Event called by the physics plugin to tell the avatar about a collision.

View File

@@ -90,6 +90,7 @@ namespace OpenSim.Region.Environment.Scenes
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
rootPart.PhysActor.LocalID = rootPart.LocalId;
rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
}
primCount++;
@@ -192,6 +193,9 @@ namespace OpenSim.Region.Environment.Scenes
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
rootPart.PhysActor.LocalID = rootPart.LocalId;
rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
rootPart.Velocity = receivedVelocity;
}