OpenGL 3D Game Tutorial 19: 3rd Person Camera

ThinMatrix · 97K views · 2014 · 15:11

Open on YouTube

Game programming & enginesComputer graphics & renderingIndie game developmenttutorial

Why Stack Overflow recommends it

Stack Overflow users link it when someone needs a third person camera that follows a player in OpenGL, and as the tutorial series they follow when building LWJGL games.

Recommended by 1 people across 1 different months, 2015 to 2020.

What it is

Part 19 of ThinMatrix's LWJGL series on building a 3D Java game with OpenGL. This episode implements a third person camera that orbits and follows the player using yaw, pitch and a distance, with a trigonometry refresher linked in the description.

What people said

Recommends Jonathan Botha · 2016-09 · Stack Overflow · on “How to fixate the camera on the player, so when the player moves the camera will follow”

In order to keep the camera fixed of the player you will need to specify what what yaw and pitch (rotations) you would like applied to the camera and a distance away from the player then you would computer they distances to translate the camera so that you see the player from that angle. Here is a brilliant tutorial on exactly what you are asking: [this video]

Cites Pikachuu · 2015-04 · Stack Overflow · on “Fixed: How to make a moving character 3rd person in pygame,python and opengl?”

So lately I've been starting to work on a 3rd person 3d mmorpg fantasy game, but I can't seem to work out the rotation and movement of the player depending on an amount of time. So what would I have to change in my code to to make the character rotate and then be able to walk or both at the same time in that direction. I'm aiming for something like this [this video] and this [LINK] I tried to translate the code to python but it's not working, my player moves all over the place. Please help me. Here is my code: player class class Player: def __init__(self, model, engine): self.model = model self.engine = engine self.RUN_SPEED = 0.1 self.TURN_SPEED = 0.6 self.GRAVITY = -0.01 self.JUMP_POWER = 2 sel

Cites user10221856 · 2020-05 · Stack Overflow · on “GLFW 3: How to get delta of the mouse scroll wheel with ScrollCallback (LWJGL 3)”

I am following this tutorial [this video] on 3D game development with LWJGL and OpenGL. And in the series, the instructor is using LWJGL 2 while I'm using LWJGL 3 with GLFW. And in a certain section he uses LWJGL's input implementations only available in LWJGL 2, so I am forced to use GLFW's callback system. I was able to add input functionality for key input, cursor movement, and mouse button input, but when I tried to add a scrolling callback, it seemed that the offsets only return -1 and 1 for the scrolling directions, and when added, the (3rd person) camera translated forward and backwards indefinitely, and the intention was for every scroll movement the camera translates forward or backward