remove the camera scene node

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

remove the camera scene node

Post by bappy »

i want to delete my camera because i m going from a menu state where i don t need a camera to a level state where i need it...so i create a ICameraSceneNode

but when i want to come back to my menu , i dont need camera anymore (2d stuff) so camera->remove()...and crach

someone have a solution ?
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

when you're only in menu-- are you still calling smgr->drawAll()?
a screen cap is worth 0x100000 DWORDS
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Post by bappy »

no.. but that s not a good way to not delete something that we don t use anymore...maybe for another level i want a different style camera, so i don t need the last anymore.
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

Code: Select all

Camera = smgr->getActiveCamera();
	if (Camera){
		smgr->setActiveCamera(0);
		Camera->remove();
	}
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Post by bappy »

that s it hunt3r
cheers
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
Post Reply