Visible/Usable conditions
Last updated
Last updated
Each CISInteractableObject component has similar settings. These settings contain condition classes for the object's usability. Essentially, you can start using the object ONLY if all Visible and Usable conditions are met. However, you can also split certain logic into stages when only one or the second group of conditions is fulfilled.
In the future, you can use the change of Visible/Usable states for your logic; you can see an example in BP_CISDataObjectExample.
Let's consider how it works with a specific example.
You want an interaction icon to appear over your interactive object from a certain distance, for instance, a filled circle, but the object should still not be interactive. It should become interactive only within 200 units; then, the circle will become hollow, and then it will be possible to interact with it.
How to do this?
In this case, let’s leave VisibleConditions empty because we don’t need additional conditions besides the initial value of InteractionDistance with the object.
For UsableConditions, let’s add the condition BP_InteractionObjectConditionDistanceCheckExample and set the radius to 200 units.
This way, interaction with the object will only be available when the character approaches it closely enough.
In the second example - now you want the initial circle in the Visible zone not to show if there are obstacles between you and the object.
For this, in VisibleConditions, you should add the condition BP_InteractionObjectConditionTraceExample.
Thus, if there are other objects between the character and the object, you will not be able to see or interact with the object.