Handling Multiple Interactable

atmuc

Member
I have an interactable game object. I can Break or Pick it. I have IInteractableTarget interface on that game object. IInteractableTarget/Interact function should receive Interact ability object or InteractableID. I cannot resolve which Interact Ability (Break or Pick) calls Interact function. Is there any way to do it?
 
You can have multiple interact abilities. In the demo scene we have multiple interact abilities for the various types of interactions.
 
I think you misunderstood my problem. My problem is not to be able to use multiple abilities. My problem is IInteractableTarget/Interact interface limitation. It does not tell me which interaction happens. It tells just an interaction happens.
 
If you had different interact abilities then you'd be able to determine which ability triggered it. With that said, I can add the interact ability as a parameter to the two IInteractableTarget methods.
 
Top