From 6031db78825df365327d1e4af012576625c115b3 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 21 May 2015 21:04:48 +0200 Subject: [PATCH] Character sliding fix --- apps/openmw/mwphysics/physicssystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 04b53a8e38..db34e04117 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -176,7 +176,8 @@ namespace MWPhysics static inline osg::Vec3f reflect(const osg::Vec3& velocity, const osg::Vec3f& normal) { - return (normal * (normal * velocity)) * 2 - velocity; + return velocity - (normal * (normal * velocity)) * 2; + // ^ dot product }