diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a50c5ae..031848c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -2475,10 +2475,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2475 | switch ((Char)ch) | 2475 | switch ((Char)ch) |
2476 | { | 2476 | { |
2477 | case 'w': | 2477 | case 'w': |
2478 | Vector3 rotate = (new Vector3(1, 0, 0) * Quaternion.CreateFromEulers(hpr.Z * Utils.DEG_TO_RAD, hpr.Y * Utils.DEG_TO_RAD, hpr.X * Utils.DEG_TO_RAD)); | 2478 | try |
2479 | { | ||
2480 | Vector3 rotate = (new Vector3(1, 0, 0) * Quaternion.CreateFromEulers(hpr.Z * Utils.DEG_TO_RAD, hpr.Y * Utils.DEG_TO_RAD, hpr.X * Utils.DEG_TO_RAD)); | ||
2479 | 2481 | ||
2480 | xyz.X += rotate.X; xyz.Y += rotate.Y; xyz.Z += rotate.Z; | 2482 | xyz.X += rotate.X; xyz.Y += rotate.Y; xyz.Z += rotate.Z; |
2481 | ds.SetViewpoint(ref xyz, ref hpr); | 2483 | ds.SetViewpoint(ref xyz, ref hpr); |
2484 | } | ||
2485 | catch (ArgumentException) | ||
2486 | { hpr.X = 0; } | ||
2482 | break; | 2487 | break; |
2483 | 2488 | ||
2484 | case 'a': | 2489 | case 'a': |
@@ -2487,10 +2492,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2487 | break; | 2492 | break; |
2488 | 2493 | ||
2489 | case 's': | 2494 | case 's': |
2490 | Vector3 rotate2 = (new Vector3(-1, 0, 0) * Quaternion.CreateFromEulers(hpr.Z * Utils.DEG_TO_RAD, hpr.Y * Utils.DEG_TO_RAD, hpr.X * Utils.DEG_TO_RAD)); | 2495 | try |
2496 | { | ||
2497 | Vector3 rotate2 = (new Vector3(-1, 0, 0) * Quaternion.CreateFromEulers(hpr.Z * Utils.DEG_TO_RAD, hpr.Y * Utils.DEG_TO_RAD, hpr.X * Utils.DEG_TO_RAD)); | ||
2491 | 2498 | ||
2492 | xyz.X += rotate2.X; xyz.Y += rotate2.Y; xyz.Z += rotate2.Z; | 2499 | xyz.X += rotate2.X; xyz.Y += rotate2.Y; xyz.Z += rotate2.Z; |
2493 | ds.SetViewpoint(ref xyz, ref hpr); | 2500 | ds.SetViewpoint(ref xyz, ref hpr); |
2501 | } | ||
2502 | catch (ArgumentException) | ||
2503 | { hpr.X = 0; } | ||
2494 | break; | 2504 | break; |
2495 | case 'd': | 2505 | case 'd': |
2496 | hpr.X--; | 2506 | hpr.X--; |