overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
147 stars 51 forks source link

Entity filters are broken #682

Open SilverfishVR opened 1 year ago

SilverfishVR commented 1 year ago

I have been playing around with entity filters (domain level) to make my domain more tamper proof but it does not seem to work.

filter.wantsToFilterAdd = true; // don't run on adds filter.wantsToFilterEdit = true; // don't run on edits filter.wantsToFilterPhysics = false; // don't run on physics filter.wantsToFilterDelete = true; // do run on deletes filter.rejectAll = false; filter;


* `print()` in the filter function also does not seem to be executed, or maybe I don’t know where it is supposed to print to.
* I found 2 filter scripts in HIFI-Content, cemeteryDeleteFilter.js & pinataDeleteFilter.js that contains the comment:
_// FIXME: FILTERS AREN'T WORKING AS OF 4-26-2018
// see https://github.com/highfidelity/hifi/pull/11997 for info on using filters_
Basinsky commented 1 year ago

I looked at the filters today, and they seem to work. I tried it on the domain and on the zone. It indeed works as you describe. You need to remove lock/unlock rights for them to work. It can prevent edits, delete's add's and physics. This means your entities can be protected against tinkering. You can give people create rights but they will not be able to use them. I found out that youu can even limit entities to a zone (although if they are grabbale you can move them out of the zone). There are more examples in the tutorial scripts.