From 2d8669ad398d90fdea9bf76a4e07707a75b9ff83 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 2 Aug 2016 21:08:22 +0100 Subject: reduce ubOde walking super climbers --- OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/PhysicsModules/ubOde') diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index 7d855f1..49020e9 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs @@ -1108,7 +1108,24 @@ namespace OpenSim.Region.PhysicsModule.ubOde vec.Z = depth * PID_P * 50; if (!flying) + { vec.Z += -vel.Z * PID_D; + if(n.Z < 0.4f) + { + vec.X = depth * PID_P * 50 - vel.X * PID_D; + vec.X *= n.X; + vec.Y = depth * PID_P * 50 - vel.Y * PID_D; + vec.Y *= n.Y; + vec.Z *= n.Z; + if(n.Z < 0.1f) + { + // cancel the slope pose + n.X = 0f; + n.Y = 0f; + n.Z = 1.0f; + } + } + } if (depth < 0.2f) { -- cgit v1.1