Determine Objects Tests
Last updated
Last updated
These settings are located in the CISCharacterInteraction component.
They determine the rules for selecting an object for interaction if multiple objects meet the conditions for a successful interaction.
Example: In front of your player, there are 3 golden apples
After you have approached them closer, you want to pick one of them up. However, certain rules must be taken into account.
For example, the closest apple to the player should become available for interaction first.
To do this, create a new subclass of CISDetermineUseObjectTest and override the CalculateObjectScore function.
As you can see, here we calculate the distance between the player and the object. Next, we calculate scores based on this distance along a curve and return this value in the Return function.
What is the result? Now, if you add this test to your character for interaction, the closest object to the character will become available for interaction, rather than some random object.