Open SilverfishVR opened 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.
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.wantsToFilterDelete = true;
All deletes are blocked, regardless of what the filter function returns, This script blocks all Edit/Add/Delete even though it always return the properties unedited, very weird: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;