Skip to main content

on_segment_pointer_move

Function on_segment_pointer_move 

Source
pub fn on_segment_pointer_move(
    e: On<'_, '_, PointerMove>,
    q_segments: Query<'_, '_, (Entity, &TrackSegment, &Transform)>,
    virtual_train: Single<'_, '_, &mut TrackPos, With<VirtualTrain>>,
    cursor_pos: Res<'_, CursorPos>,
    current_dir: Res<'_, CurrentPlacingDir>,
)
Expand description

Observer which when a pointer moves inside a segment updates the corresponding train track pos