diff options
author | Teravus Ovares | 2008-04-23 15:32:19 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-23 15:32:19 +0000 |
commit | 2a3bdde0fa78c5a59c530e6d974dfd6709aa1519 (patch) | |
tree | d2857d6fc06cde42bef42a731e115caf60add086 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | Two small changes: (diff) | |
download | opensim-SC-2a3bdde0fa78c5a59c530e6d974dfd6709aa1519.zip opensim-SC-2a3bdde0fa78c5a59c530e6d974dfd6709aa1519.tar.gz opensim-SC-2a3bdde0fa78c5a59c530e6d974dfd6709aa1519.tar.bz2 opensim-SC-2a3bdde0fa78c5a59c530e6d974dfd6709aa1519.tar.xz |
* Adds llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z,TF)
* Currently if you apply that to only one or two axis you get unpredictable and sometimes explosive results.
* Three axis works well enough to play with it anyway. More work is needed here.
* Fixed an incorrectly named method in ODE.NET
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 42 |
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 |