Skip to content

Fix: Tracer origin going offscreen - #205

Closed
KMatias123 wants to merge 1 commit into
lambda-client:1.21.11from
KMatias123:1.21.11-tracer-bobfix
Closed

Fix: Tracer origin going offscreen#205
KMatias123 wants to merge 1 commit into
lambda-client:1.21.11from
KMatias123:1.21.11-tracer-bobfix

Conversation

@KMatias123

Copy link
Copy Markdown
Contributor

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.1fval horizontalBob = sin(reverseSpeed *PI.toFloat()) * progress *0.05fval 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.11December 21, 2025 15:30
@emyfops

Copy link
Copy Markdown
Contributor

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

@emyfops

Copy link
Copy Markdown
Contributor

This pr is probably superseded by #230. I'll close it and you can open it back in case this is still an issue.

@emyfopsemyfops closed this Jan 27, 2026
Sign up for freeto 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

@KMatias123@emyfops