pub fn remap_current_entity_y_coordinate(
    cx: &EventContext<'_>,
    y_coord: f32
) -> f32
Expand description

Remap an y-coordinate to a [0, 1] value within the current entity’s bounding box. The value will be clamped to [0, 1] if it isn’t already in that range. This ignores the border width.

Note

As y-coordinates increase from top to bottom, this value is likely the inverse of what you want. 0.0 is the bottom of the enitty and 1.0 corresponds to the top of the entity.