From 173d13b0a4e68e682fd5e585290a48f82ec9a475 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 15 May 2008 06:35:01 +0000 Subject: * Added about half of the planned ODE physics options to OpenSim.ini.example. * Some will do cool things, some will make your scene explode dramatically if you're not careful. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index d1f1074..37a8b77 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1155,14 +1155,14 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_buoyancy > 0) { - fz = ((9.8f * m_buoyancy) * m_mass); + fz = (((-1 * _parent_scene.gravityz) * m_buoyancy) * m_mass); //d.Vector3 l_velocity = d.BodyGetLinearVel(Body); - //m_log.Info("Using Buoyancy: " + buoyancy + " G: " + (9.8f * m_buoyancy) + "mass:" + m_mass + " Pos: " + Position.ToString()); + //m_log.Info("Using Buoyancy: " + buoyancy + " G: " + (_parent_scene.gravityz * m_buoyancy) + "mass:" + m_mass + " Pos: " + Position.ToString()); } else { - fz = (-1 * ((9.8f * (-1 * m_buoyancy)) * m_mass)); + fz = (-1 * (((-1 * _parent_scene.gravityz) * (-1 * m_buoyancy)) * m_mass)); } @@ -1171,7 +1171,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_usePID) { // If we're using the PID controller, then we have no gravity - fz = 9.8f * this.Mass; + fz = (-1 * _parent_scene.gravityz) * this.Mass; // no lock; for now it's only called from within Simulate() -- cgit v1.1