Closed unco182 closed 8 years ago
You should add a BoundingBox
component to your model node and get its box()
property.
Thanks !
Is there any up to date example that use BoundingBox ?
I already saw this : example/raycasting/src/main.cpp about raycasting but it seems outdated
By using this example, I got a bounding box size of (0,0). How should I proceed to resize this box to the size of my 3D model?
auto bbox = component::BoundingBox::create();
node->addComponent(bbox);
Then you have the bbox->box()->width()
, ->height()
and ->depth()
properties.
Hi,
I would like to put the center of the 3D universe of my app in the center of my 3D model and make the camera look at it. I thought that using canvas->width() and canvas->height() would help me to get to the center. But the size of my canvas is (640,920). How can I get the max size of my 3D model instead?
Thx in advance