setting camera position
Posted: Mon Jul 31, 2006 5:29 pm
hi all ,
in my application i need to write the following code in irrlicht engine
----------------------------------------------------------------------------------
camera -> SetPosition( scene, D3DVALUE( 0 ),
D3DVALUE( ( 2.3 * X_LIMIT ) - ( cameraPosition
* X_LIMIT / 450.0 ) ), D3DVALUE( 0 ) );
// Convert the angle of the camera rotation to a suitable vector.
D3DVALUE xVector = D3DVALUE( sin( ( 180 -
cameraPosition2 ) / 180.0 * PI ) );
D3DVALUE zVector = D3DVALUE( cos( ( 180 -
cameraPosition2 ) / 180.0 * PI ) );
camera -> SetOrientation( scene, D3DVALUE( 0 ), D3DVALUE( -1 ),
D3DVALUE( 0 ), D3DVALUE( -xVector ),
D3DVALUE( 0 ), D3DVALUE( zVector ) )
-----------------------------------------------------------------------------------
in irrlicht engine for setOrientation what do we have to do .
please let me know .
in my application i need to write the following code in irrlicht engine
----------------------------------------------------------------------------------
camera -> SetPosition( scene, D3DVALUE( 0 ),
D3DVALUE( ( 2.3 * X_LIMIT ) - ( cameraPosition
* X_LIMIT / 450.0 ) ), D3DVALUE( 0 ) );
// Convert the angle of the camera rotation to a suitable vector.
D3DVALUE xVector = D3DVALUE( sin( ( 180 -
cameraPosition2 ) / 180.0 * PI ) );
D3DVALUE zVector = D3DVALUE( cos( ( 180 -
cameraPosition2 ) / 180.0 * PI ) );
camera -> SetOrientation( scene, D3DVALUE( 0 ), D3DVALUE( -1 ),
D3DVALUE( 0 ), D3DVALUE( -xVector ),
D3DVALUE( 0 ), D3DVALUE( zVector ) )
-----------------------------------------------------------------------------------
in irrlicht engine for setOrientation what do we have to do .
please let me know .