/// Converts a world position to a tile's center in world space.
///
/// Returns None if the position is out of bounds.
Converts a world position to a tile's center in world space.
Returns None if the position is out of bounds.
Converts a world position to a tile ' s center in world space . Returns None if the position is out of bounds .
pub fn world_to_tile_center(
        &self,
        cam_transform: &GlobalTransform,
        world_pos: Vec3,
    ) -> Option<Vec3> {
        if let Some(tile) = self.world_to_tile(cam_transform, world_pos) {
            return Some(self.tile_center_world_unchecked(cam_transform, tile));
        }
        None
    }
pub fn world_to_tile_center ( & self , cam_transform : & GlobalTransform , world_pos : Vec3 , ) -> Option < Vec3 > { if let Some ( tile ) = self . world_to_tile ( cam_transform , world_pos ) { return Some ( self . tile_center_world_unchecked ( cam_transform , tile ) ) ; } None }
Converts a world position to a tile's center in world space.
Converts a world position to a tile ' s center in world space .
&self
cam_transform
&GlobalTransform
world_pos
Vec3