So anyway I opened up the Movement example and used that as a template for the character. Here are my questions:
Replaced the sphere with the Ninja that is set on idle, I set it so he moves forward when you press W he moves back on S and rotates on A and D. My question for this is when I move and rotate he keeps moving forward. I need the local rotation, maybe it's something simple but I know no C++ (I can only edit scripts) but I'm a fast learner. Here's my movement part of the script:
Code: Select all
sphere node around respectively. */
core::vector3df nodePosition = node->getPosition();
core::vector3df nodeRotation = node->getRotation();
if(receiver.IsKeyDown(irr::KEY_KEY_W))
nodePosition.Z += MOVEMENT_SPEED * frameDeltaTime;
node->setFrameLoop(0,14);
node->setAnimationSpeed(15);
if(receiver.IsKeyDown(irr::KEY_KEY_S))
nodePosition.Z -= MOVEMENT_SPEED * frameDeltaTime;
if(receiver.IsKeyDown(irr::KEY_KEY_A))
nodeRotation.Y -= 40 * frameDeltaTime;
if(receiver.IsKeyDown(irr::KEY_KEY_D))
nodeRotation.Y += 40 * frameDeltaTime;
node->setPosition(nodePosition);
node->setRotation(nodeRotation);
node->setFrameLoop(206,250);
node->setAnimationSpeed(15);
Next question, how would I make a third person shooter styled camera? As the title of the game is Fantasy Battlefield, it is mostly weapons like axes and swords, with some guns/bows.
If I have more questions which I'm sure I will, I'll post them here.