newbie...
trying to figure out the Ir GE. is not there any list that actually explains each class and what it does?
I am trying to modify one of the examples.
1. remove the cube.
2. replace 'syndey' with a non animated mesh... spaceship.3ds
3. control the camera in y.p.r. axis as in a fps.
1 n 2 is my biggest problem. can not find how to load a 3ds object and attach to node. since the 3ds object is not animated what class would i use?
thanks.
help getting cube n syndey out of program
Full documentation is in doc/irrlicht.chm and http://irrlicht.sourceforge.net/docu/index.html
1. This code is adding cube scene node.
You can remove it or use
to remove it from scene after some time.
2. You can use any (supported) mesh as animated mesh scene node.
3. Use search engine to check forum - there is many examples.
1. This code is adding cube scene node.
Code: Select all
scene::ISceneNode* n = smgr->addCubeSceneNode();
if (n)
{
n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
n->setMaterialFlag(video::EMF_LIGHTING, false);
scene::ISceneNodeAnimator* anim =
smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
n->addAnimator(anim);
anim->drop();
}
Code: Select all
n->remove();
2. You can use any (supported) mesh as animated mesh scene node.
3. Use search engine to check forum - there is many examples.
I think enigmaseti is actually using one of the tutorials (movement?) and wants to remove from the source code the code that adds in the cube and sydney.
The tutorial source code though explains each step of the way so it should be very clear what code to delete to stop these things being added. TO not add the cube just remove any mention of the cubeSceneNode.
No matter what model you are loading you pretty much always use the same code to load it and then that function decided what model loading code to call based on the extension of the file. So just replace the path to sydney.md2 to the path to your spaceship and it will work.
The tutorial source code though explains each step of the way so it should be very clear what code to delete to stop these things being added. TO not add the cube just remove any mention of the cubeSceneNode.
No matter what model you are loading you pretty much always use the same code to load it and then that function decided what model loading code to call based on the extension of the file. So just replace the path to sydney.md2 to the path to your spaceship and it will work.
-
- Posts: 7
- Joined: Wed Sep 19, 2007 3:58 pm
TomiZ, thanks for the pointer to the web info......
JP, you are correct. I did replace all ref to sydney with my 3ds name and it does display it. What I am wondering, since the spaceship is not animated it there a different class without the added overhead of animation, since i am not animating the ship?
JP, you are correct. I did replace all ref to sydney with my 3ds name and it does display it. What I am wondering, since the spaceship is not animated it there a different class without the added overhead of animation, since i am not animating the ship?
Yes, there is, i'm not sure if it really saves a huge amount but it's good practice to do it properly i suppose!
I think you'd do this instead:
IMesh = smgr->getMesh("spaceship.3ds")->getMesh(0);
ISceneNode* spaceshipNode = smgr->addMeshSceneNode(mesh);
getMesh(path) always returns an IAnimatedMesh* so if you want to make an unanimated node you just grab the first frame of the mesh and use that.
I think you'd do this instead:
IMesh = smgr->getMesh("spaceship.3ds")->getMesh(0);
ISceneNode* spaceshipNode = smgr->addMeshSceneNode(mesh);
getMesh(path) always returns an IAnimatedMesh* so if you want to make an unanimated node you just grab the first frame of the mesh and use that.