store the physics inertia override in Mysql and add it to serializer. run prebuild is required

This commit is contained in:
UbitUmarov
2017-04-01 17:49:17 +01:00
parent 24b7903cd0
commit 443fc60cdf
8 changed files with 336 additions and 38 deletions

View File

@@ -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>