mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
store the physics inertia override in Mysql and add it to serializer. run prebuild is required
This commit is contained in:
@@ -5037,20 +5037,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetInertiaData(float TotalMass, Vector3 CenterOfMass, Vector3 Inertia, Vector4 aux )
|
||||
{
|
||||
PhysicsInertiaData inertia = new PhysicsInertiaData();
|
||||
inertia.TotalMass = TotalMass;
|
||||
inertia.CenterOfMass = CenterOfMass;
|
||||
inertia.Inertia = Inertia;
|
||||
inertia.InertiaRotation = aux;
|
||||
|
||||
if(TotalMass < 0)
|
||||
RootPart.PhysicsInertia = null;
|
||||
else
|
||||
RootPart.PhysicsInertia = new PhysicsInertiaData(inertia);
|
||||
|
||||
PhysicsActor pa = RootPart.PhysActor;
|
||||
|
||||
if(pa !=null)
|
||||
{
|
||||
PhysicsInertiaData inertia = new PhysicsInertiaData();
|
||||
inertia.TotalMass = TotalMass;
|
||||
inertia.CenterOfMass = CenterOfMass;
|
||||
inertia.Inertia = Inertia;
|
||||
inertia.InertiaRotation = aux;
|
||||
pa.SetInertiaData(inertia);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set the user group to which this scene object belongs.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user