first: I did my first steps in irrlicht years ago.
For a new project I remembered it and now I'm actually working with it.
If an admin is listening:
I've forgotten my former account to the forum.
Therefore I wanted to create a new one and when entered my email address
it says that it is already in use.
"Fine", I thought, "lets use the old account" .
But in order to reset my old password, I not only need the email address but also
my old username that I've forgotten.
I ended up creating a new email address just in order to be able to use this forum.
But now to the technical question:
To start my project I just reused one of the examples coming with the irrlich SDK:
09. MeshViewer
Since I need OpenGl I hardcoded this driver circumventing the user chooseable options at program startup.
In order to have a better orientation in 3d space I created those three red green blue arrows representing the x-,y-,z axis in blender
and exported this model as Collada *.dae, Wavefront *.obj, and *.3ds.
I added a new tab in the Toolset GUI in order to have scrollbars for the position and the rotation of the loaded model.
The Collada Model looks best even with the transparent sphere I used in the origin of the little coordinate system,
but it doesn't react to the movement of the scrollbars.
The 3ds-Model reacts to the scrollbars but the sphere is not transparent and also the shading and the segments of the arrows is not visible just plain colors.
In the *.obj Model the sphere ist transparent but the material of the arrows is also just of flat colors. While the scrollbars have an effect to the obj-model.
The event handling looks as following:
Code: Select all
else if (id == GUI_ID_SCROLLBAR_X_POSITION)
{
const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
core::vector3df position;
if (Model)
{
position = Model->getAbsolutePosition();
position.X = ((f32)pos);
Model->setPosition(position);
}
}
if a model is not NULL the absolute position is get than the new x-position is set and afterwards the model is positioned at its new location.
Anybody knows, why irrlicht behaves differently according to the loaded file type?
Greetings
Markus