pub fn update_cursor(&mut self, ui_camera: &Camera, game_camera: &Camera) {
        let ndc_pos = self.input_processor.cursor_ndc_position();

        self.cursor_result = ndc_pos
            .map(|p| ui_camera.project_ndc_into_world(p))
            .and_then(|ray| cursor_raycast(ray, &self.ui.current_space()));

        if self.cursor_result.is_none() {
            if let Some(character_ref) = &self.game_character {
                self.cursor_result = ndc_pos
                    .map(|p| game_camera.project_ndc_into_world(p))
                    .and_then(|ray| cursor_raycast(ray, &character_ref.borrow().space));
            }
        }
    }
/// Call this once per frame to update the cursor raycast.
///
/// TODO: bad API; revisit general cursor handling logic.
Call this once per frame to update the cursor raycast.
TODO: bad API; revisit general cursor handling logic.
Call this once per frame to update the cursor raycast . TODO : bad API ; revisit general cursor handling logic .
pub fn update_cursor(&mut self, ui_camera: &Camera, game_camera: &Camera) {
        let ndc_pos = self.input_processor.cursor_ndc_position();
        self.cursor_result = ndc_pos
            .map(|p| ui_camera.project_ndc_into_world(p))
            .and_then(|ray| cursor_raycast(ray, &self.ui.current_space()));
        if self.cursor_result.is_none() {
            if let Some(character_ref) = &self.game_character {
                self.cursor_result = ndc_pos
                    .map(|p| game_camera.project_ndc_into_world(p))
                    .and_then(|ray| cursor_raycast(ray, &character_ref.borrow().space));
            }
        }
    }
pub fn update_cursor ( & mut self , ui_camera : & Camera , game_camera : & Camera ) { let ndc_pos = self . input_processor . cursor_ndc_position ( ) ; self . cursor_result = ndc_pos . map ( | p | ui_camera . project_ndc_into_world ( p ) ) . and_then ( | ray | cursor_raycast ( ray , & self . ui . current_space ( ) ) ) ; if self . cursor_result . is_none ( ) { if let Some ( character_ref ) = & self . game_character { self . cursor_result = ndc_pos . map ( | p | game_camera . project_ndc_into_world ( p ) ) . and_then ( | ray | cursor_raycast ( ray , & character_ref . borrow ( ) . space ) ) ; } } }
Call this once per frame to update the cursor raycast.
Call this once per frame to update the cursor raycast .
&mut self
ui_camera
&Camera
game_camera
&Camera