Shoulder Surfing Reloaded

Shoulder Surfing Reloaded

26M Downloads

Spyglass crosshair misaligned

JustDudeIt123 opened this issue · 4 comments

commented

Description

When using Spyglass Improvement v1.5 in combination with Shoulder Surfing Reloaded v4.12.0 on Minecraft 1.20.1 (Forge 47.4.0), the crosshair during spyglass zoom is not properly centered (on third-person view).

As a result:

  • The zoom view highlights blocks or entities that are not directly at the center of the screen.
  • This causes incorrect behavior in mods like Useful Spyglass v0.8.0, which rely on targeting the precise center (e.g., for displaying block/entity info).

Steps to Reproduce

  1. Install:
    • Spyglass Improvement v1.5
    • Shoulder Surfing Reloaded v4.12.0
    • Useful Spyglass v0.8.0 (optional, to see incorrect info)
  2. Enter third person view.
  3. Use the spyglass.
  4. Try to target a block or mob — you’ll notice the selected block/entity is offset from the screen center.

Expected Behavior

The crosshair should either:

  • Be fully centered (so selection aligns with what the player sees in the middle), or
  • Be customizable, so users can align it manually.

Actual Behavior

  • The crosshair appears off-center during zoom.
  • Highlighted blocks/entities do not align with the actual screen center.
  • Causes visual bugs and wrong behavior in mods relying on accurate raycast (e.g., Useful Spyglass shows wrong descriptions).

Also could you check this issues. I wasn't sure whose issue it was.

Minecraft version

1.20.1

Incompatible mod name

Spyglass Improvement

Incompatible mod version

1.5

Game Logs

https://mclo.gs/TVCXgaB

commented

Thanks for the report. When using the spyglass, the FOV changes in order to create a zoom effect. In order to prevent desorientation and confusion, the perspective does not switch to first person when using the spyglass (also related to the issue described here). The behavior you are observing is that Useful Spyglass does not support Shoulder Surfing Reloaded. Instead of raycasting from the center of the camera, Useful Spyglass always raycast from the center of the player's head. There are two possible ways of fixing the issue:

  1. Useful Spyglass adds an integration for Shoulder Surfing Reloaded. Shoulder Surfing Reloaded already provides APIs to easily make that possible. Example:
IShoulderSurfing instance = ShoulderSurfing.getInstance();
if (instance.isShoulderSurfing()) {
    PickContext pickContext = new PickContext.Builder(camera).build();
    return instance.getObjectPicker().pick(pickContext, interactionRange, partialTick, player);
}
  1. Shoulder Surfing Reloaded adds a compatibility "hack" for Useful Spyglass. This could break at any time.

I would prefer option 1. Could you please open an issue over at the Useful Spyglass repository?

commented

Sure. give me a sec

commented

And I report another problem with Spyglass Improvement. I wasn't sure whose issue it was. Can you please take a look and tell me if this applies to your mod or to spyglass improvements?

commented

The author of UsefulSpyglass has closed their issue as completed, but it doesn't look like they actually changed something? I this issue still relevant for you or did they indeed address the issue?