mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	Apply legs yaw to accumulated movement.
This commit is contained in:
		
							parent
							
								
									7742ba165a
								
							
						
					
					
						commit
						93b723a066
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1235,9 +1235,11 @@ namespace MWRender
 | 
			
		|||
            mRootController->setEnabled(enable);
 | 
			
		||||
            if (enable)
 | 
			
		||||
            {
 | 
			
		||||
                mRootController->setRotate(osg::Quat(mLegsYawRadians, osg::Vec3f(0, 0, 1))
 | 
			
		||||
                    * osg::Quat(mBodyPitchRadians, osg::Vec3f(1, 0, 0)));
 | 
			
		||||
                osg::Quat legYaw = osg::Quat(mLegsYawRadians, osg::Vec3f(0, 0, 1));
 | 
			
		||||
                mRootController->setRotate(legYaw * osg::Quat(mBodyPitchRadians, osg::Vec3f(1, 0, 0)));
 | 
			
		||||
                yawOffset = mLegsYawRadians;
 | 
			
		||||
                // When yawing the root, also update the accumulated movement.
 | 
			
		||||
                movement = legYaw * movement;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (mSpineController)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue