SetPosition
SetPosition
setPosition(vector3df(0,0,0)) place the center of the mesh at (0,0,0) ?
Hi guest, for your 1st question, i guess it has to be on your modeler. in LW you center your object on the grid. On Xsi you tag vertices and then Transform - Move center to vertices.
For your 2nd question, so far I've just been working by trial and error , but getting the position of the camera at the start of your object and then at the end and displaying the result of a substraction might work. I'm sure there's another method, but then again, don't know.
For your 2nd question, so far I've just been working by trial and error , but getting the position of the camera at the start of your object and then at the end and displaying the result of a substraction might work. I'm sure there's another method, but then again, don't know.
I would try something like this
then just substract center from actual cube position, it should work, I didn't checked
Code: Select all
aabbox3df box = scene_node_name->getBoundingBox();
vector3df center = (box.MaxEdge + box.MinEdge)/2;