Skip to content

Conversation

@KMatias123
Copy link

If you try to sprint with view bobbing on and tracers in the crosshair mode the center where they all "point" will move around due to view bobbing. This is annoying. This commit fixes it in a way that just moves the "start of the tracers" away from the camera so the movement is not as noticeable. In the future it can also be fixed by completely negating the movement from the camera.horizontalPlane.
This is the kotlin code for calculating the bobbing if someone wants to calculate the bobbing and implement a better solution.

val clientPlayerLikeState: ClientPlayerLikeState = player.state
val reverseSpeed = clientPlayerLikeState.getReverseLerpedDistanceMoved(tickDelta)
val progress = clientPlayerLikeState.lerpMovement(tickDelta)

val verticalBob = abs(cos(reverseSpeed * PI.toFloat() - 0.2f) * progress) * 0.1f
val horizontalBob = sin(reverseSpeed * PI.toFloat()) * progress * 0.05f

val result = Vec3d(horizontalBob.toDouble(), verticalBob.toDouble(), -1.0)

I just put this here cuz I don't want anyone else to have to be without tracers :3

@KMatias123 KMatias123 changed the base branch from 1.21.5 to 1.21.11 December 21, 2025 15:30
@emyfops
Copy link
Collaborator

emyfops commented Dec 21, 2025

This would be a temporary fix as constructor plans to add 2d tracers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants