diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 95bdc7b..90f74df 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -450,6 +450,9 @@ public class BSPrim : BSPhysObject | |||
450 | Gravity = ComputeGravity(Buoyancy); | 450 | Gravity = ComputeGravity(Buoyancy); |
451 | PhysScene.PE.SetGravity(PhysBody, Gravity); | 451 | PhysScene.PE.SetGravity(PhysBody, Gravity); |
452 | 452 | ||
453 | OMV.Vector3 currentScale = PhysScene.PE.GetLocalScaling(PhysShape.physShapeInfo); // DEBUG DEBUG | ||
454 | DetailLog("{0},BSPrim.UpdateMassProperties,currentScale{1},shape={2}", LocalID, currentScale, PhysShape.physShapeInfo); // DEBUG DEBUG | ||
455 | |||
453 | Inertia = PhysScene.PE.CalculateLocalInertia(PhysShape.physShapeInfo, physMass); | 456 | Inertia = PhysScene.PE.CalculateLocalInertia(PhysShape.physShapeInfo, physMass); |
454 | PhysScene.PE.SetMassProps(PhysBody, physMass, Inertia); | 457 | PhysScene.PE.SetMassProps(PhysBody, physMass, Inertia); |
455 | PhysScene.PE.UpdateInertiaTensor(PhysBody); | 458 | PhysScene.PE.UpdateInertiaTensor(PhysBody); |
@@ -1040,6 +1043,20 @@ public class BSPrim : BSPhysObject | |||
1040 | } | 1043 | } |
1041 | } | 1044 | } |
1042 | 1045 | ||
1046 | public override OMV.Vector3 PIDTarget | ||
1047 | { | ||
1048 | set | ||
1049 | { | ||
1050 | base.PIDTarget = value; | ||
1051 | BSActor actor; | ||
1052 | if (PhysicalActors.TryGetActor(MoveToTargetActorName, out actor)) | ||
1053 | { | ||
1054 | // if the actor exists, tell it to refresh its values. | ||
1055 | actor.Refresh(); | ||
1056 | } | ||
1057 | |||
1058 | } | ||
1059 | } | ||
1043 | // Used for llSetHoverHeight and maybe vehicle height | 1060 | // Used for llSetHoverHeight and maybe vehicle height |
1044 | // Hover Height will override MoveTo target's Z | 1061 | // Hover Height will override MoveTo target's Z |
1045 | public override bool PIDHoverActive { | 1062 | public override bool PIDHoverActive { |
@@ -1063,7 +1080,7 @@ public class BSPrim : BSPhysObject | |||
1063 | 1080 | ||
1064 | // Applying a force just adds this to the total force on the object. | 1081 | // Applying a force just adds this to the total force on the object. |
1065 | // This added force will only last the next simulation tick. | 1082 | // This added force will only last the next simulation tick. |
1066 | public void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { | 1083 | public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { |
1067 | // for an object, doesn't matter if force is a pushforce or not | 1084 | // for an object, doesn't matter if force is a pushforce or not |
1068 | if (IsPhysicallyActive) | 1085 | if (IsPhysicallyActive) |
1069 | { | 1086 | { |