mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 11:26:37 +00:00 
			
		
		
		
	Merge branch 'rotation' into 'master'
Add inverse order rotation support to SetAngle (feature #5579) Closes #5579 See merge request OpenMW/openmw!305
This commit is contained in:
		
						commit
						61b83697f5
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		|  | @ -59,6 +59,7 @@ | ||||||
|     Feature #5524: Resume failed script execution after reload |     Feature #5524: Resume failed script execution after reload | ||||||
|     Feature #5525: Search fields tweaks (utf-8) |     Feature #5525: Search fields tweaks (utf-8) | ||||||
|     Feature #5545: Option to allow stealing from an unconscious NPC during combat |     Feature #5545: Option to allow stealing from an unconscious NPC during combat | ||||||
|  |     Feature #5579: MCP SetAngle enhancement | ||||||
|     Feature #5610: Actors movement should be smoother |     Feature #5610: Actors movement should be smoother | ||||||
|     Task #5480: Drop Qt4 support |     Task #5480: Drop Qt4 support | ||||||
|     Task #5520: Improve cell name autocompleter implementation |     Task #5520: Improve cell name autocompleter implementation | ||||||
|  |  | ||||||
|  | @ -159,12 +159,20 @@ namespace MWScript | ||||||
|                     float ay = ptr.getRefData().getPosition().rot[1]; |                     float ay = ptr.getRefData().getPosition().rot[1]; | ||||||
|                     float az = ptr.getRefData().getPosition().rot[2]; |                     float az = ptr.getRefData().getPosition().rot[2]; | ||||||
| 
 | 
 | ||||||
|  |                     // XYZ axis use the inverse (XYZ) rotation order like vanilla SetAngle.
 | ||||||
|  |                     // UWV axis use the standard (ZYX) rotation order like TESCS/OpenMW-CS and the rest of the game.
 | ||||||
|                     if (axis == "x") |                     if (axis == "x") | ||||||
|                         MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az); |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az,MWBase::RotationFlag_inverseOrder); | ||||||
|                     else if (axis == "y") |                     else if (axis == "y") | ||||||
|                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az); |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az,MWBase::RotationFlag_inverseOrder); | ||||||
|                     else if (axis == "z") |                     else if (axis == "z") | ||||||
|                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle); |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle,MWBase::RotationFlag_inverseOrder); | ||||||
|  |                     else if (axis == "u") | ||||||
|  |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az,MWBase::RotationFlag_none); | ||||||
|  |                     else if (axis == "w") | ||||||
|  |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az,MWBase::RotationFlag_none); | ||||||
|  |                     else if (axis == "v") | ||||||
|  |                         MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle,MWBase::RotationFlag_none); | ||||||
|                 } |                 } | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue