-
Hi, I'm trying to make a hex 3d map using a hexagonal library. As I looked at the example, I joined this with the mesh that I have, and I ended up using another library, bevy_mod_picking (ver.0.15), to write a click-related method. The following events allow the mouse to enter and exit the entity. commands.spawn((
PbrBundle {
transform: Transform::from_xyz(pos.x, 0., pos.y)
.with_scale(Vec3::splat(0.9)),
mesh: mesh_handle.clone(),
material: mat,
..default()
},
Honeycomb,
PickableBundle::default(),
RaycastPickTarget::default(),
On::<Pointer<Over>>::run(on_over),
On::<Pointer<Out>>::run(on_out)
))
fn on_over(
mut commands: Commands,
event: Listener<Pointer<Over>>,
grid: Res<Map>,
){
commands.entity(event.target).insert(grid.path_mat.clone());
}
fn on_out(
mut commands: Commands,
event: Listener<Pointer<Out>>,
grid: Res<Map>,
){
if grid.blocked_coords.get(&grid.entities_forentity[&event.target]).is_some(){
commands.entity(event.target).insert(grid.blocked_mat.clone());
}
else if grid.path_entities.get(&event.target).is_some(){
commands.entity(event.target).insert(grid.path_mat.clone());
}
else{
commands.entity(event.target).insert(grid.default_mat.clone());
}
} The code works fine, but I want to eliminate the following basic effects. As the document says, (if I understand correctly) to lighten up effects like debug. I modified the TOML file as follows. bevy_mod_picking = {version = "0.15.0", feature = ["backend_raycast", "backend_bevy_ui"]} However, this issue has not been resolved. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's a default feature so you would also have to add alternatively you can disable it an runtime like this
|
Beta Was this translation helpful? Give feedback.
The key in the TOML file is called
features
, but you appear to have writtenfeature
without the "s".See https://doc.rust-lang.org/cargo/reference/features.html#dependency-features