aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2015-09-23 01:42:24 +0100
committerUbitUmarov2015-09-23 01:42:24 +0100
commit43ca70655f5773b34a4f084ec896ab539da74917 (patch)
tree314d4db71abf0380688c0777450005c279cc19a1 /OpenSim/Region
parent change the encapsulation of compressed land patchs in llUDP packets (diff)
downloadopensim-SC_OLD-43ca70655f5773b34a4f084ec896ab539da74917.zip
opensim-SC_OLD-43ca70655f5773b34a4f084ec896ab539da74917.tar.gz
opensim-SC_OLD-43ca70655f5773b34a4f084ec896ab539da74917.tar.bz2
opensim-SC_OLD-43ca70655f5773b34a4f084ec896ab539da74917.tar.xz
remove a odd floating offset on physical prims/terrain collisions
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs25
1 files changed, 9 insertions, 16 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index a2dd885..41fec89 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -2295,21 +2295,14 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2295 2295
2296// geom_name_map[GroundGeom] = "Terrain"; 2296// geom_name_map[GroundGeom] = "Terrain";
2297 2297
2298 d.Matrix3 R = new d.Matrix3(); 2298 d.Quaternion q = new d.Quaternion();
2299 2299 q.X = 0.5f;
2300 Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f); 2300 q.Y = 0.5f;
2301 Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f); 2301 q.Z = 0.5f;
2302 2302 q.W = 0.5f;
2303 2303
2304 q1 = q1 * q2; 2304 d.GeomSetQuaternion(GroundGeom, ref q);
2305 2305 d.GeomSetPosition(GroundGeom, pOffset.X + m_regionWidth * 0.5f, pOffset.Y + m_regionHeight * 0.5f, 0.0f);
2306 Vector3 v3;
2307 float angle;
2308 q1.GetAxisAngle(out v3, out angle);
2309
2310 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
2311 d.GeomSetRotation(GroundGeom, ref R);
2312 d.GeomSetPosition(GroundGeom, pOffset.X + m_regionWidth * 0.5f, pOffset.Y + m_regionHeight * 0.5f, 0);
2313 RegionTerrain.Add(pOffset, GroundGeom); 2306 RegionTerrain.Add(pOffset, GroundGeom);
2314 TerrainHeightFieldHeights.Add(GroundGeom, _heightmap); 2307 TerrainHeightFieldHeights.Add(GroundGeom, _heightmap);
2315 TerrainHeightFieldHeightsHandlers.Add(GroundGeom, _heightmaphandler); 2308 TerrainHeightFieldHeightsHandlers.Add(GroundGeom, _heightmaphandler);
@@ -2419,7 +2412,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2419 2412
2420// geom_name_map[GroundGeom] = "Terrain"; 2413// geom_name_map[GroundGeom] = "Terrain";
2421 2414
2422 d.GeomSetPosition(GroundGeom, pOffset.X + m_regionWidth * 0.5f, pOffset.Y + m_regionHeight * 0.5f, 0); 2415 d.GeomSetPosition(GroundGeom, pOffset.X + m_regionWidth * 0.5f, pOffset.Y + m_regionHeight * 0.5f, 0.0f);
2423 RegionTerrain.Add(pOffset, GroundGeom); 2416 RegionTerrain.Add(pOffset, GroundGeom);
2424 TerrainHeightFieldHeights.Add(GroundGeom, _heightmap); 2417 TerrainHeightFieldHeights.Add(GroundGeom, _heightmap);
2425 TerrainHeightFieldHeightsHandlers.Add(GroundGeom, _heightmaphandler); 2418 TerrainHeightFieldHeightsHandlers.Add(GroundGeom, _heightmaphandler);