stackotter / delta-client

An open source Minecraft Java Edition client built for speed.

Home Page:https://deltaclient.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View bobbing

stackotter opened this issue · comments

At the moment the camera is attached directly to the player's position. View bobbing would be implemented by adding some offset calculated from (presumably) the player's velocity and the current time using sine and cosine functions. To confirm this it would be best to look at the decompiled vanilla sources for the specifics.

The best place to implement this would be in getCameraUniforms at the bottom of RenderCoordinator.swift. Eventually more of the camera based calculations should be refactored out of RenderCoordinator for neatness, but it's fine to just add it on to the end for now.