From 09cd233958c9e2ae627404ef068579aa8dc61527 Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Tue, 16 Jun 2020 17:54:02 +0200 Subject: [PATCH] Proper orientation of arrows --- apps/openmw/mwrender/weaponanimation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwrender/weaponanimation.cpp b/apps/openmw/mwrender/weaponanimation.cpp index aa87edd43..71bef0f5a 100644 --- a/apps/openmw/mwrender/weaponanimation.cpp +++ b/apps/openmw/mwrender/weaponanimation.cpp @@ -170,6 +170,9 @@ void WeaponAnimation::releaseArrow(MWWorld::Ptr actor, float attackStrength) MWWorld::Ptr weaponPtr = *weapon; MWWorld::Ptr ammoPtr = *ammo; +#ifdef USE_OPENXR + orient = osg::computeLocalToWorld(nodepaths[0]).getRotate(); +#endif MWBase::Environment::get().getWorld()->launchProjectile(actor, ammoPtr, launchPos, orient, weaponPtr, speed, attackStrength); inv.remove(ammoPtr, 1, actor);