aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs42
1 files changed, 39 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 6af7662..4f65cc7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1179,9 +1179,12 @@ namespace OpenSim.Region.Environment.Scenes
1179 SceneObjectPart rootpart = m_rootPart; 1179 SceneObjectPart rootpart = m_rootPart;
1180 if (rootpart != null) 1180 if (rootpart != null)
1181 { 1181 {
1182 rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z); 1182 if (rootpart.PhysActor != null)
1183 rootpart.PhysActor.PIDTau = tau; 1183 {
1184 rootpart.PhysActor.PIDActive = true; 1184 rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z);
1185 rootpart.PhysActor.PIDTau = tau;
1186 rootpart.PhysActor.PIDActive = true;
1187 }
1185 } 1188 }
1186 } 1189 }
1187 1190
@@ -2229,5 +2232,38 @@ namespace OpenSim.Region.Environment.Scenes
2229 } 2232 }
2230 2233
2231 #endregion 2234 #endregion
2235
2236 internal void SetAxisRotation(int axis, int rotate10)
2237 {
2238 bool setX = false;
2239 bool setY = false;
2240 bool setZ = false;
2241
2242 int xaxis = 2;
2243 int yaxis = 4;
2244 int zaxis = 8;
2245
2246 if (m_rootPart != null)
2247 {
2248 setX = ((axis & xaxis) != 0) ? true : false;
2249 setY = ((axis & yaxis) != 0) ? true : false;
2250 setZ = ((axis & zaxis) != 0) ? true : false;
2251
2252 float setval = (rotate10 > 0) ? 1f : 0f;
2253
2254 if (setX)
2255 m_rootPart.m_rotationAxis.X = setval;
2256 if (setY)
2257 m_rootPart.m_rotationAxis.Y = setval;
2258 if (setZ)
2259 m_rootPart.m_rotationAxis.Z = setval;
2260
2261 if (setX || setY || setZ)
2262 {
2263 m_rootPart.SetPhysicsAxisRotation();
2264 }
2265
2266 }
2267 }
2232 } 2268 }
2233} \ No newline at end of file 2269} \ No newline at end of file