Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LittleJackFlash

@LittleJackFlash
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to make the camera rotate with the player?
    L LittleJackFlash

    Yes

    C / C++ / MFC question tutorial

  • How to make the camera rotate with the player?
    L LittleJackFlash

    Hello sorry I wasn't very clear, basically at the moment I have a camera that following the player in the 4 direction i.e moving forward, backwards and strafing right and left, I was aiming to be able to rotate the camera around the player in order to me able to see the rest of the world around him. yet when I tried adjusting the glrotate i got the camera to kinda rotate but the longer to hold either left or right the further away from the player the camera becomes.

    //Bind Camera to Player
    gluLookAtf(player.position.getX() + player.xrot ,player.position.getY() + 15, player.position.getZ() + 20,
    player.position.getX() ,player.position.getY(),player.position.getZ() ,
    0.0, 1.0, 0.0);

    glPushMatrix();
    glRotatef(xrot, 0.0, 0.1, 0.0);
    glTranslatef(pos.getX(), pos.getY(), pos.getZ());

    C / C++ / MFC question tutorial

  • How to make the camera rotate with the player?
    L LittleJackFlash

    I currently have the following code -

    gluLookAtf(player.position.getX(),player.position.getY() + 15,player.position.getZ() + 20,
    player.position.getX() ,player.position.getY(),player.position.getZ() ,
    0.0, 1.0, 0.0);

    How can I make the player and the camera rotate together?

    C / C++ / MFC question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups