reduce bounding box size

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
jsmurthy4
Posts: 18
Joined: Mon Sep 10, 2007 4:04 pm

reduce bounding box size

Post by jsmurthy4 »

Hi,
i load .x file as IAnimatedMeshSceneNode. when i am checking collision by getSceneNodeFromRayBB() the bounding box is so big that i want to reduce the bounding box size.

[img]
http://mur_games.googlegroups.com/web/dbox.jpg?gda=4wckFTkAAAA7PkSmDFhbH1qLBGS3CT0o7_ur5b01CTRd8ykdIeFJ0mG1qiJ7UbTIup-M2XPURDTEeSUifSkJxQWscTEfDXcg&gsc=Im651QsAAABv36N3D1m82P3_nX89OAVQ
[/img]

:?: How to reduce bounding box size?

help me :shock:
Last edited by jsmurthy4 on Sun Apr 27, 2008 7:05 am, edited 1 time in total.
radiant
Posts: 112
Joined: Fri Feb 22, 2008 8:04 pm
Location: Mexico

Post by radiant »

load the mesh and before u create the scene node call:

Code: Select all

virtual void irr::scene::IMesh::setBoundingBox  	(   	const core::aabbox3df &   	 box  	 )   	 [pure virtual]
  	

set user axis aligned bounding box 
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

If I remember correctly there was some problem with bounding box of x files when new animation system was introduced. Dev team was working on it.
jsmurthy4
Posts: 18
Joined: Mon Sep 10, 2007 4:04 pm

Post by jsmurthy4 »

Thanks
load the mesh and before u create the scene node call
it worked for me :D thanks radiant
virtual void irr::scene::IMesh::setBoundingBox ( const core::aabbox3df & box ) [pure virtual]

set user axis aligned bounding box

Code: Select all

scene::IAnimatedMesh *killmesh=smgr->getMesh("G:/xformat/test02.x"); 
	killmesh->setBoundingBox(core::aabbox3df(-10,0,-10,15,80,20));
Thanks radiant,arras for repling :)
Post Reply