1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:23:56 +00:00

Heavily mitigate jittery objects far from origin

This commit is contained in:
Cody Glassman 2022-01-06 22:01:28 +00:00 committed by psi29a
parent d8d7a3b372
commit cdae1c4c97

View file

@ -4,6 +4,8 @@
#include <mutex> #include <mutex>
#include <memory> #include <memory>
#include <osg/Vec3d>
#include <BulletCollision/CollisionDispatch/btCollisionObject.h> #include <BulletCollision/CollisionDispatch/btCollisionObject.h>
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -56,12 +58,12 @@ namespace MWPhysics
mPosition = position; mPosition = position;
} }
osg::Vec3f getPosition() const osg::Vec3d getPosition() const
{ {
return mPosition; return mPosition;
} }
osg::Vec3f getPreviousPosition() const osg::Vec3d getPreviousPosition() const
{ {
return mPreviousPosition; return mPreviousPosition;
} }
@ -71,8 +73,8 @@ namespace MWPhysics
std::unique_ptr<btCollisionObject> mCollisionObject; std::unique_ptr<btCollisionObject> mCollisionObject;
osg::Vec3f mVelocity; osg::Vec3f mVelocity;
osg::Vec3f mSimulationPosition; osg::Vec3f mSimulationPosition;
osg::Vec3f mPosition; osg::Vec3d mPosition;
osg::Vec3f mPreviousPosition; osg::Vec3d mPreviousPosition;
}; };
} }