Hey Greenya (and others),
first of all, thanks for your latest advice.
Now I am working with Wavefront .obj and was able to import a textured mesh. But as you probably have encountered, it is flipped cause of differnt (left hand/ right hand) coordinate system definition beweeten the creating software and irrlicht. My google and API search offered me a setRotation method, but I can't access them.
Code: Select all
VideoDriver driver = device.VideoDriver;
SceneManager smgr = device.SceneManager;
AnimatedMesh mesh = smgr.GetMesh("../../Modelle/Aachen_Kopie.obj");
SceneNode node = null;
if (mesh != null)
node = smgr.AddOctreeSceneNode(mesh.GetMesh(0), null, -1, 1024);
if (node != null)
node.Position = new Vector3Df(0,0,0);
Texture tex = driver.GetTexture("../../Modelle/Aachen2.jpg");
AnimatedMeshSceneNode ani = smgr.AddAnimatedMeshSceneNode(mesh);
ani.SetMaterialTexture(0, tex);
ani.SetMaterialFlag(MaterialFlag.Lighting, false);
Irrlicht API tells me that SceneNode has a virtual function called setRotation. AnimatedMeshSceneNode is derived from SceneNode so I should be able to call the method. But in IrrlichtLime I can't access setRotation in SceneNode nor in an AnimatedMeshSceneNode object. Something like
ani.setRotation(new Vector3Df(0.0f,0.0f,1.0f));
should work I guessed, but I get a compilation error.
Am I doing sth wrong? Or are those functions not implemented in IrrlichtLime yet or can't they be implemented cause of the property virtual?
How do I rotate an object just the one time to get rid of the problem? Already found sth to rotate the mesh using an animator, but that's not what I wanted to do.
Greets Felix
PS: Just found the hint on an older page as to use the Property Rotation and just assaign the Vector. It works but the question remains...