Page 1 of 1

setting camera position

Posted: Mon Jul 31, 2006 5:29 pm
by hkolli
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 .

Posted: Mon Jul 31, 2006 6:27 pm
by hybrid
Use setTarget with the correct vector. And get used to the API docs which will reduce the amount of questions that you cannot answer on your own.