add 'selectable' entity property

This commit is contained in:
MihailRis 2026-07-27 21:24:40 +03:00
parent 17095011e6
commit 439d95355d
3 changed files with 5 additions and 1 deletions

View file

@ -176,7 +176,7 @@ std::optional<Entities::RaycastResult> Entities::rayCast(
for (auto [entity, eid, transform, body] : view.each()) {
if (eid.uid == settings.ignoredUid || !body.enabled ||
(settings.solidEntitiesOnly && !eid.def.solid)) {
(settings.solidEntitiesOnly && !eid.def.solid) || !eid.def.selectable) {
continue;
}
if (settings.entitiesFilter) {

View file

@ -42,6 +42,9 @@ struct EntityDef {
/// @brief Solid entity material material
std::string material;
/// @brief Can the entity be interacted with cursor (on_attack, on_use)
bool selectable = true;
/// @brief Does entity prevent blocks setup
bool blocking = true;