Hi,
I created a chest. When the player is interacting with it it instantiates one or more itempickup prefabs (that the player can walk to and pickup).
But I would like to give the items immediately to the player instead of instantiating the itempickups.
What would be the best way to do this?
My idea was to still use my script (that is based on IInteractableTarget) and copy some code from the scripts ItemPickup and ObjectPickup.
I wouldn't use the OnTriggerEnter() but then I need a reference to the character that is interacting. But it seems that the interacting system isn't passing thru a reference of the interacting character. Am I correct?
Or is there maybe a better way to do this?
I created a chest. When the player is interacting with it it instantiates one or more itempickup prefabs (that the player can walk to and pickup).
But I would like to give the items immediately to the player instead of instantiating the itempickups.
What would be the best way to do this?
My idea was to still use my script (that is based on IInteractableTarget) and copy some code from the scripts ItemPickup and ObjectPickup.
I wouldn't use the OnTriggerEnter() but then I need a reference to the character that is interacting. But it seems that the interacting system isn't passing thru a reference of the interacting character. Am I correct?
Or is there maybe a better way to do this?