0 votes
asked in InteractionSystem by

In my game, players can interact with a ball or with other players. But there are times when I want the player to interact only with other players, even if the ball is closer (and vice versa). In other words, I want to get the closest InteractionTrigger that belongs to a player, not any InteractionTrigger. Is there a good way to do that?


1 Answer

0 votes
answered by (22.1k points)


Yes, normally you would trigger the closest interaction:

int closestTriggerIndex = interactionSystem.GetClosestTriggerIndex();

But you could foreach through 


To find the trigger you were specifically looking for, then call interactionSystem.TriggerInteraction() with the index of the trigger you need.



Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.