How to determine the camera position?3rd camera

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
superpop
Posts: 21
Joined: Mon May 14, 2007 1:17 pm

How to determine the camera position?3rd camera

Post by superpop »

Code: Select all

	Character = pManager->getSceneManager()->addAnimatedMeshSceneNode(pManager->getSceneManager()->getMesh("../../media/sydney.md2"));
	Character->setMaterialFlag(video::EMF_LIGHTING, false); 

	Character->setFrameLoop(160, 183); 
	Character->setAnimationSpeed(40);       
	Character->setMD2Animation(scene::EMAT_STAND); 
	Character->setRotation(core::vector3df(0,180.0f,0)); 
	Character->setMaterialTexture(0,pManager->getDriver()->getTexture("/media/sydney.bmp")); 
	Character->setPosition(core::vector3df(108,140,-140)) ; 

Code: Select all

// add camera 
	scene::ICameraSceneNode* camera = pManager->getSceneManager()->addCameraSceneNode(); 
	camera->setPosition(core::vector3df(120,140,-180));
	camera->setTarget(core::vector3df(200,170,140)); 
	camera->setFarValue(1200.0f); 
i use the map 20kdm2.bsp,and a wow like camera in the forum.
i mean when i determine the model position,how to determine the relevant parameters of the camera?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

whats so hard about it?
camera->getPosition() or camera->getAbsolutePosition()

if you dont have the camera pointer anymore, then you cna use
smgr->getActiveCamera() for that
Image
Image
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

right, if you have set... functions (e.g. setPosition) you also have (should have) the corresponding get... functions (e.g. getPosition)... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply