1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[C++/Ogre Engine] - First Person Camera with Collision Detection + Jumping

Discussion in 'Programming' started by Exclyptic, Dec 28, 2013.

  1. #1
    Hello Everyone,

    I am currently working on a jumping puzzle game concept based on a first person view. Being new at this, its been a steep learning curve but am getting there in very small strides.

    I currently have to start with... A world floor, a first person camera which utilizes the keyboard and mouse for movement and a few place holder objects and a couple of lights.

    The camera at the minute can move anywhere in the area and it not limited to the game area. Obviously this is a problem in itself which needs fixing.

    The next thing on my to do list, is to implement collision detection for my camera. This would involve grounding my camera to the floor but this is not necessarily what I want as the camera (character) would need to about to have the ability to jump from one platform to another.

    I am guessing I would need to use the bullet physics engine on the camera to achieve this? No Idea how I would implement any of this at the minute.

    The tutorials are a bit vague ..

    Let me know if you want to see any of my code? I dont know what i would need to show you.

    Thanks
     
    Exclyptic, Dec 28, 2013 IP
  2. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Bump!

    I'm really needing help with this. Could anyone offer any support here?
     
    Exclyptic, Dec 29, 2013 IP
  3. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #3
    Your post is way too vague. If you are asking if you need to use a Bullet for collision detection the answer is No. However, it would make YOUR job a lot easier and cleaner. So it's recommended. There's really nothing else to add....
     
    NetStar, Dec 29, 2013 IP
  4. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Right let me go in a bit more detail....

    I have a scenenode which has a camera and sphere attached to it, I was going to use the sphere around the camera to flag any collisions with objects within the game. I couldnt figure out how to put collison detection on the camera itself so i thought this would be simplier.

    Originally I had controls controlling the camera (using the mouse for rotation and WASD for X,Z ) but now since I have the both the sphere and the camera, I transfered the controls to move the scenenode so the camera and the sphere woudl move together.

    My next problem is I dont know how to change the rotation of the scenenode when moving the camera rotation. Ideally i would like to rotate the X and Z axis on yaw rotation. Essentially I would like it behaviouring simpler to minecraft.

    Now for the collision detection. I need the sphere big enough to encase camera, then am guessing I use something similar to this to detect collision.

    Does this explain a bit more?
     
    Exclyptic, Dec 29, 2013 IP
  5. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #5
    To be honest with you my experience with game programming is on the entry level. This is not the forum for your question. You are better off finding a forum that relates directly to C++ game programming or the Engine you are using.
     
    NetStar, Dec 29, 2013 IP