rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.42k stars 313 forks source link

Wrong Z Hover Position in 2D view #7763

Open slyfox3 opened 5 days ago

slyfox3 commented 5 days ago

See the screenshot. The hover position contains a non-zero z value in a 2D view.

To Reproduce Log a Points2D with hundreds points, and hover on them.

def _logScatter(samples: List[float], entity_prefix: str, static: bool, width: float):
    n = len(samples)
    half_width = width / 2.0
    radii = width / 20.0
    xs = [random.uniform(-half_width, half_width) for _ in range(n)]
    rr.log(
        f"{entity_prefix}/scatter",
        rr.Points2D(
            list(zip(xs, samples)),
            radii=radii,
        ),
        static=static,
    )

Expected behavior Hover position is also 2D instead of 3D.

Screenshots

image
Wumpf commented 5 days ago

Looks like an implementation detail is leaking here on how we arrange things in 2D spaces! This might yet turn out to be tricky: 3D objects in 2d ofc do have a 3D position, so we should show 3d positions for those and 2d positions for "true" 2d things (also interesting to check: are 3D hover positions for 3d objects even correct 😳? if not consider just always showing 2d as a stopgap solution)