diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 5b9afa4fe2..497fd653a8 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1256,11 +1256,13 @@ namespace MWWorld MWWorld::Ptr World::moveObjectBy(const Ptr& ptr, osg::Vec3f vec, bool moveToActive) { auto* actor = mPhysics->getActor(ptr); + osg::Vec3f newpos = ptr.getRefData().getPosition().asVec3() + vec; if (actor) + { actor->adjustPosition(vec); - - osg::Vec3f newpos = ptr.getRefData().getPosition().asVec3() + vec; - return moveObject(ptr, newpos.x(), newpos.y(), newpos.z(), false, moveToActive && ptr != getPlayerPtr()); + return moveObject(ptr, newpos.x(), newpos.y(), newpos.z(), false, moveToActive && ptr != getPlayerPtr()); + } + return moveObject(ptr, newpos.x(), newpos.y(), newpos.z()); } void World::scaleObject (const Ptr& ptr, float scale)