mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 10:56:38 +00:00 
			
		
		
		
	rotation now also work with the physic representation
This commit is contained in:
		
							parent
							
								
									70c74ede05
								
							
						
					
					
						commit
						164a5c8fe4
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -293,10 +293,12 @@ namespace MWWorld | ||||||
|     { |     { | ||||||
|         if (OEngine::Physic::PhysicActor* act = mEngine->getCharacter(handle)) |         if (OEngine::Physic::PhysicActor* act = mEngine->getCharacter(handle)) | ||||||
|         { |         { | ||||||
|             // TODO very dirty hack to avoid crash during setup -> needs cleaning up to allow
 |  | ||||||
|             // start positions others than 0, 0, 0
 |  | ||||||
|             act->setRotation(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w)); |             act->setRotation(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w)); | ||||||
|         } |         } | ||||||
|  |         if (OEngine::Physic::RigidBody* body = mEngine->getRigidBody(handle)) | ||||||
|  |         { | ||||||
|  |             body->getWorldTransform().setRotation(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w)); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     void PhysicsSystem::scaleObject (const std::string& handle, float scale) |     void PhysicsSystem::scaleObject (const std::string& handle, float scale) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue