fix(objects/input): filter out handlers with disabled fields

This commit is contained in:
Nova
2024-07-19 00:34:50 -04:00
parent 4d8d38e4e5
commit a8e16a8411
3 changed files with 21 additions and 0 deletions

View File

@@ -207,6 +207,13 @@ impl MousePointer {
};
node.enabled()
})
// filter out all the fields with disabled handlers
.filter(|handler| {
let Some(node) = handler.field.spatial.node() else {
return false;
};
node.enabled()
})
// ray march to all the enabled handlers' fields
.map(|handler| {
let result = handler.field.ray_march(Ray {