EngineHub/WorldEditCUI

Player-independent crosshair

Closed this issue · 6 comments

The Problem

  • Its cumbersome to figure out the optimum coordinates for a specific pixel of a block (to summon a mob or determine the optimal "facing" for a /teleport).
  • It's hard to figure out the center of a large cuboid selection, and the center of each face of the cuboid. Temporarily replacing blocks (like //center) can interfere with gravity blocks, rails, and water flow, in which case //undo doesn't really live up to its name.

A Solution

It would be nice to be able to place persistent cross hairs, and move them around easily to fine-tune their position.
They align with the axes by default, but can be switched to diagonal instead (all angles 45° off axis).
A cuboid selection should have temporary cross hairs in the center of their walls that only live until the cuboid changes. If a player moves their location, they become a regular cross hair. Mere display style changes (e.g. whether diagonal) does not make them permanent.
I'd like to have a per-crosshair option for how long its rays shall be: half block, full block, or two blocks. In diagonal mode, this means the distance between the block corners (√3 m if I remember correctly).

Aiming the regular player crosshair at one of ours makes it glow. Then, with the command //chair you could transfer movement controls to that crosshair. I'm not sure what to do about sneak though: It would make sense to have that be "down", but also "slow precise movement". We probably want multiple speed steps though, so probably the latter needs another key anyway. If you issue //chair while controlling a cross hair, it switches movement controls back to the player character.

Pressing the "drop item" key while controlling a cross hair toggles whether it is temporary. Releasing contol of a temporary cross hair deletes it. Maybe a controlled temporary crosshair should emit soul particles to indicate it is in mortal danger.

Alternatives

I could try and make a datapack that summons particle effects, but simulating float math by repeating tiny teleports would be really hacky, and still would lack the integration with cuboid selections.

Anything Else?

Thanks for maintaining WE CUI!

Feature creep will probably soon include all kinds of geometric construction between and around crosshairs.

I'm not really understanding what part of this is in-scope of WECUI. /summon and /teleport are not things it is really concerned with, and if you need to see the center this extremely advanced control over crosshairs is pretty overkill.

My thought was that it would be useful for adventure map makers. Yes, the precision control is out of the original scope. I was thinking whether it should better be a separate mod, but having two different kinds of cross hairs would give a worse user experience. On the other hand, once WE has a notification mechanism for the cuboid selection changing, that other mod could just subscribe to that.

I am not really sure what you mean by "two different kinds of cross hairs", I don't think WECUI adds a crosshair? Minecraft just comes with one.

I am not really sure what you mean by "two different kinds of cross hairs",

The two bullets in my opening post. If CUI would implement the center markers, and another mod would implement the movable one, potentially eventually diverging in how they are controlled or what features they support, that would give a bad user experience.

Well, we almost certainly wouldn't implement them as crosshairs or give any control over them, so I don't think that's likely to be confusing.

I thought a bit more about it and concluded that it's really way too far out of scope for CUI.