Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
torsoGeom->setPosition(Ogre::Vector3(0,size.y-((size.y-4*radius)/2+2*radius),0)); //can't find a good way to explain this
If, for conveniance, we write
r = radius h = size.y
We get :
size.y-((size.y-4*radius)/2+2*radius) = h - [ (h-4r)/2 + 2r ] = h - [ (h-4r+4r)/2 ] = h - h/2 = h/2
Which is a lot simpler.
And, instead of writing :
modelNode->translate(Vector3(0,-radius/ninjaNode->getScale().y,0));
Why not put :
modelNode->translate( Ogre::Vector3( 0, -min.y / mNode->getScale().y, 0 ) ); // The bounding box must have its bottom at the height 0
(i tried, seems to work, and it's much more understandable)
Contributors to this page: Ceacy
.
Page last modified on Wednesday 29 of November, 2006 21:55:08 GMT by Ceacy.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
97
online users

