drwbns

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

103 Neutral

About drwbns

  • Rank
    Newbie
  1. Hi guys, I was wondering how to structure classes that can handle player movement but also allow to switch to vehicle movements. I found a post here that looks correct, but it's left me baffled as a novice. Any further explanations to this system? [url="http://www.ogre3d.org/forums/viewtopic.php?f=10&t=70229#p458355"]http://www.ogre3d.org/forums/viewtopic.php?f=10&t=70229#p458355[/url]
  2. Hey guys, I'm trying to use some functions from glext.h, but which lib should I link to fix the error - error LNK2001: unresolved external symbol _glLoadProgramNV@16
  3. Adding sprint ability - how?

    hmm, it's just not changing anything and I don't understand why.
  4. How would I add a sprinting ability when Right Shift is held to the following code? Thanks for any help! [code]void InputController::injectKeyboardState(OIS::Keyboard* mKeyboard) { //camera float walk = 0,strafe = 0, up = 0, sprint = 0; if (mKeyboard->isKeyDown(OIS::KC_A)) { strafe = -1; } else if (mKeyboard->isKeyDown(OIS::KC_D)) { strafe = 1; } if (mKeyboard->isKeyDown(OIS::KC_W)) { walk = -1; } else if (mKeyboard->isKeyDown(OIS::KC_S)) { walk = 1; } if (mKeyboard->isKeyDown(OIS::KC_PGUP)) { up = 1; } else if (mKeyboard->isKeyDown(OIS::KC_PGDOWN)) { up = -1; } GST->GetCurrentCam()->UpdateLocation(walk, strafe, up); //player walk = 0, strafe = 0, sprint = 0; if (mKeyboard->isKeyDown(OIS::KC_UP)) { walk = 1; } else if (mKeyboard->isKeyDown(OIS::KC_DOWN)) { walk = -1; } if (mKeyboard->isKeyDown(OIS::KC_LEFT)) { strafe = 1; } else if (mKeyboard->isKeyDown(OIS::KC_RIGHT)) { strafe = -1; } if (walk != 0 || strafe != 0) { Quaternion q = TPCAM->GetRotation().Inverse(); Ogre::Vector3 send(walk,0,strafe); send = q * send; PLAYER->orderMove(send.x,send.z); } }[/code] I tried this - but it didn't do anything. help please. [code]void InputController::injectKeyboardState(OIS::Keyboard* mKeyboard) { //camera float walk = 0,strafe = 0, up = 0, sprint = 0; if (mKeyboard->isKeyDown(OIS::KC_A)) { strafe = -1; } else if (mKeyboard->isKeyDown(OIS::KC_D)) { strafe = 1; } if (mKeyboard->isKeyDown(OIS::KC_W)) { walk = -1; } else if (mKeyboard->isKeyDown(OIS::KC_S)) { walk = 1; } if (mKeyboard->isKeyDown(OIS::KC_PGUP)) { up = 1; } else if (mKeyboard->isKeyDown(OIS::KC_PGDOWN)) { up = -1; } GST->GetCurrentCam()->UpdateLocation(walk, strafe, up); //player walk = 0, strafe = 0, sprint = 0; if (mKeyboard->isKeyDown(OIS::KC_UP)) { if (mKeyboard->isKeyDown(OIS::KC_RSHIFT)) { sprint = 1; walk = sprint + 1; } else {walk = 1;} } else if (mKeyboard->isKeyDown(OIS::KC_DOWN)) { if (mKeyboard->isKeyDown(OIS::KC_RSHIFT)) { sprint = -1; walk = sprint -1; } else {walk = -1;} } if (mKeyboard->isKeyDown(OIS::KC_LEFT)) { if (mKeyboard->isKeyDown(OIS::KC_RSHIFT)) { sprint = 1; strafe = sprint + 1; } else { strafe = 1;} } else if (mKeyboard->isKeyDown(OIS::KC_RIGHT)) { if (mKeyboard->isKeyDown(OIS::KC_RSHIFT)) { sprint = -1; strafe = sprint -1; } else { strafe = -1; } } if (walk != 0 || strafe != 0) { Quaternion q = TPCAM->GetRotation().Inverse(); Ogre::Vector3 send(walk,0,strafe); send = q * send; PLAYER->orderMove(send.x,send.z); } }[/code]
  5. I have a thread already started at the link below.I'm getting a bad initialized variable and I don't know why. I didn't write the code, it's ogre code but a user written Game. Thanks for any help. [url="http://www.ogre3d.org/forums/viewtopic.php?f=2&t=64221"]http://www.ogre3d.org/forums/viewtopic.php?f=2&t=64221[/url]