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.
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 ofRenderCoordinator.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.