how to render out cubeshape

ronbunny

23-03-2009 02:36:00

i have set a bounding box with
createBody("", new NxOgre::CubeShape(40,30,30), Position, "density: 0.5, Group: playergroup");

but how do i render the bounding box out?

spacegaier

23-03-2009 07:32:05

Normally, you set the bounding box on and off via the scenenode (which should be a member a the body, you just created). Which NxOgre version do you use?

ronbunny

23-03-2009 08:31:08

my version is 0.9-38

are u referring to Node->showBoundingBox(true);?
i am creating a bounding box around my model... but couldn't figure out how to render out the bounding box because i need to position it around my model.

i know theres this line of code which i read from the tutorial to draw out the box? but i guess mines a older version so i do not have the NxOgre::NodeRenderableparams inside.
NodeRenderableParams nrp;
nrp.setToDefault();
nrp.mIdentifierUsage = NxOgre::NodeRenderableParams::IU_Use;
nrp.mIdentifier = sn->getName();

spacegaier

23-03-2009 09:04:29

Yes, I'm refering to Node->showBoundingBox(true);. This draws the BoundingBox around your mesh (or what ever is attached to this scenenode). Don't understand what you want to tell us with the second part of your post :| .

ronbunny

23-03-2009 09:07:42

what i mean is i want to draw the bounding box out from the body and not the node's bounding box