Skip to content

Instantly share code, notes, and snippets.

@dmlary
dmlary / picking_raycast_multiple.rs
Last active May 23, 2023 02:52
`bevy_mod_picking` raycast backend with support for multiple raycasting sets
// This is a rough & dirty fork of `bevy_picking_raycast` that supports multiple raycast sets.
// This is needed when you have multiple cameras you want to raycast from at the same time.
// The key change is making the `Backend` generic for raycast sets. It's harder to work
// with as it requires an understanding of `bevy_mod_raycast`.
//
// Other changes: removed `Picking` component management; added enable/disable via config
//! A raycasting backend for `bevy_mod_picking` that uses `bevy_mod_raycast` for raycasting.
use bevy::{prelude::*, utils::HashMap, window::PrimaryWindow};
@dmlary
dmlary / fzf-cscope.vim
Last active January 6, 2023 14:31
fzf-vim cscope integration
" Requires the fzf-vim plugin to work. Performs cscope queries against
" cscope.out, uses fzf-vim to display results and previews.
" specify multiple cscope databases to search.
" " short form, list of directories containing cscope.out
" let g:fzf_cscope_databases = [".", "~/kernels/2.6.12"]
"
" " long form database in separate directory from sources
" let g:fzf_cscope_databases = [
" [".", "build/cscope.out"],