About Store Forum Documentation Contact



Post Reply 
Camera lagging behind objects when going at high speed
Author Message
LinuxCat Offline
Member

Post: #1
Camera lagging behind objects when going at high speed
Hello, I am planning to make a very simple yet fast-paced player movement system with a first-person view.
I was playing around with a "Controller" object like in the tutorial 11-05 (Controllers) and noticed that when setting a camera's position to an object like this:
Code:
Cam.updateBegin();
Cam.yaw-=Ms.d().x;
Cam.at(ctrl.actor.pos()); //with ctrl being the controller object
Cam.setSpherical();
Cam.updateEnd().set();
The camera starts lagging behind when the object moves, and it's more noticeable when it moves fast or starts to fall. Here is a video of what i mean.
10-20-2022 09:46 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Camera lagging behind objects when going at high speed
there are a few things you can think of:
-physics timesteps
-setting camera in wrong position of codes (before/update) of game physics/character
10-21-2022 03:24 AM
Find all posts by this user Quote this message in a reply
LinuxCat Offline
Member

Post: #3
RE: Camera lagging behind objects when going at high speed
(10-21-2022 03:24 AM)Esenthel Wrote:  -setting camera in wrong position of codes (before/update) of game physics/character
Woops, that was it. I didn't see that... Thanks!
10-21-2022 09:29 AM
Find all posts by this user Quote this message in a reply
Post Reply