mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Character sliding fix
This commit is contained in:
parent
cfe57199d7
commit
6031db7882
@ -176,7 +176,8 @@ namespace MWPhysics
|
|||||||
|
|
||||||
static inline osg::Vec3f reflect(const osg::Vec3& velocity, const osg::Vec3f& normal)
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user