setting camera position

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
hkolli
Posts: 42
Joined: Thu Jul 13, 2006 8:29 pm

setting camera position

Post 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 .
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply