Hey!
I have been looking in the tutorials for help about this issue, but all I could find was example projects that didn't give me a clue at all... because I had trouble implementing the examples into the project of mine.
What I want to do is to load an MD2 mesh and then bind a texture to it. Then move the loaded model to a specified vector location.
Any solutions to that?
MD2 model loading
MD2 model loading
Programmers don't DIE, they just GOSUB and then RETURN.
The tutorials should be reaaaally useful here as that's exactly what they do in most of them. Any of the tutorials with the Sydney (lass in a black spandex suit) model are loading an MD2 model.
Do you want to move the model to a point immediately or do you want it to walk/run there?
Take the Hello World tutorial for example, all it does really is load a Sydney model, which is what you want:
Do you want to move the model to a point immediately or do you want it to walk/run there?
Take the Hello World tutorial for example, all it does really is load a Sydney model, which is what you want:
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); // loads the model
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); // creates a node so the model gets rendered
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false); // turns off lighting so we can see her
node->setFrameLoop(0, 310); // Sets the animation
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") ); // Sets the texture
node->setPosition(vector3df(0,0,0)); // sets her position to 0,0,0
}
FPS
What I am making is an FPS, so I might want it to try run to the player's position (which is instantly changed so the model's destination has to be instantly changed as well). But I will try that code and see if it works for me (anything I need to include?).
EDIT: Code worked. Now I just need to bind it to actions (so that it doesn't just stand there; running without moving) - I want it to react to keypresses and change animation according to that.
Also I need to know how to increase the brightness?
EDIT: Code worked. Now I just need to bind it to actions (so that it doesn't just stand there; running without moving) - I want it to react to keypresses and change animation according to that.
Also I need to know how to increase the brightness?
Programmers don't DIE, they just GOSUB and then RETURN.
For key presses check out the tutorials as they show you how to use an event reciever (most of them do).
In fact just work through all the tutorials as it seems you haven't done that yet. They'll answer a lot of 'newbie' questions you might come up with and should get you up and running with a good start on an FPS game. For example the movement tutorial should help you with a way of getting your character to run to a certain point.
As for increasing the brightness i'm not sure there's any easy way of doing that with any settings...
In fact just work through all the tutorials as it seems you haven't done that yet. They'll answer a lot of 'newbie' questions you might come up with and should get you up and running with a good start on an FPS game. For example the movement tutorial should help you with a way of getting your character to run to a certain point.
As for increasing the brightness i'm not sure there's any easy way of doing that with any settings...