Trace/Focus Interactable ID whitelist
Last updated
Last updated
In AC_PC_Interaction there is a name array WhiteList_InteractableIDs.
Leave it empty if all interactables should be focusable. Otherwise add all interactable IDs that should be focusable. You can adjust this at runtime. For example if you equip a tool it could unlock more interactables to be focusable and by that interactable.
Since a blacklist also makes sense but is not included you can add a new variable called BlackList_InteractableIDs. To make the black list working you can adjust this function as follows:
On an interaction the server checks and validates if the related Interactable ID is whitelisted or blacklisted for this player. This means if you want to adjust the whitelist or blacklist you need to add or remove an array element on the server. Depending on your systems it could already be the case that is somewhere running on server already where you want to change these lists.
However, if you want the client to decide what should be on the whitelist and blacklist you need to trigger either on your player controller or the AC_PC_Interaction component a custom event that is set to run on server and 'Reliable' = true. This event for the whitelist could look like this:
For the blacklist you can create a similar event (adding or removing from the BlackListInteractableIDs array). If you would like the client read what's inside the white- or blacklist you can set these two arrays to Replicated.