Hi everybody and sorry for this very noobish question :/
I've searching in the forum (without any good result), and i just wonder, how do i "scale" a .irr object, without doing it in IrrEdit?
Btw! Also, how do i get the XYZ Position of the "camera"?
//Many thanks!
Scale a .irr model
Scale a .irr model
"Clicker"
To begin with, .irr files are not models themselves, they just contain information about where you models are, their rotation and scale.
The camera position can be obtained like this
The camera position can be obtained like this
Code: Select all
vector3df CamPos=SceneManager->getActiveCamera()->getAbsolutePosition();
If you don't have anything nice to say, don't say anything at all.
First off there is no such thing as an .irr object. When you load an .irr file, it loads the nodes specified by that file. There may be zero or more scene nodes in the .irr file, and all of them would be loaded. Once the .irr file is loaded, if you know the name or id of the scene node you want, you can use the ISceneManager to find it. There are methods getSceneNodeFromName() and getSceneNodeFromId() that are useful for doing that.
Once you have a scene node, you can scale it by calling setScale(). If that node has any children nodes, they will be scaled also. If you want to keep the children the same size, you will have to update their scale to undo the scale applied to the parent.
You can get the position of the camera by calling getPosition() or getAbsolutePosition() on it.
Travis
Once you have a scene node, you can scale it by calling setScale(). If that node has any children nodes, they will be scaled also. If you want to keep the children the same size, you will have to update their scale to undo the scale applied to the parent.
You can get the position of the camera by calling getPosition() or getAbsolutePosition() on it.
Travis