mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:26:43 +00:00 
			
		
		
		
	another coordinate system fix; still not working properly
This commit is contained in:
		
							parent
							
								
									1f077a5d5f
								
							
						
					
					
						commit
						c6f4bcbf68
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		|  | @ -37,9 +37,9 @@ namespace MWRender | |||
|         if (updateCamera) | ||||
|             camera->setPosition (Ogre::Vector3 ( | ||||
|                 mPlayer.ref.pos.pos[0], | ||||
|                 -mPlayer.ref.pos.pos[2], | ||||
|                 mPlayer.ref.pos.pos[1])); | ||||
| 
 | ||||
|                 mPlayer.ref.pos.pos[2], | ||||
|                 -mPlayer.ref.pos.pos[1])); | ||||
| std::cout<<"camera: "<<camera->getPosition()<<std::endl; | ||||
|       // TODO: Update sound listener
 | ||||
|     } | ||||
| 
 | ||||
|  | @ -65,8 +65,8 @@ namespace MWRender | |||
|       // Get new camera position, converting back to MW coords.
 | ||||
|       Vector3 pos = camera->getPosition(); | ||||
|       relX = pos[0]; | ||||
|       relY = -pos[2]; | ||||
|       relZ = pos[1]; | ||||
|       relY = pos[2]; | ||||
|       relZ = -pos[1]; | ||||
| 
 | ||||
|       // TODO: Collision detection must be used to find the REAL new
 | ||||
|       // position.
 | ||||
|  |  | |||
|  | @ -65,8 +65,8 @@ namespace MWScript | |||
|                     const int cellSize = 8192; | ||||
| 
 | ||||
|                     ESM::Position pos; | ||||
|                     pos.pos[0] = cellSize * x; | ||||
|                     pos.pos[1] = cellSize * y; | ||||
|                     pos.pos[0] = cellSize * (x+0.5); | ||||
|                     pos.pos[1] = cellSize * (y+0.5); | ||||
|                     pos.pos[2] = 0; | ||||
|                     pos.rot[0] = pos.rot[1] = pos.rot[2] = 0; | ||||
|                     context.getWorld().changeToExteriorCell (pos); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue