Fixed Item swap
This commit is contained in:
parent
dfe1451d3b
commit
40b2ab5bde
|
@ -82,7 +82,7 @@ public class Character : MonoBehaviour
|
|||
|
||||
public void PickupItem(PickupInteractible itemToPickup)
|
||||
{
|
||||
if (_carriedItemModel)
|
||||
if (_carriedInteractible)
|
||||
{
|
||||
_carriedInteractible.gameObject.SetActive(true);
|
||||
_carriedInteractible.transform.parent = null;
|
||||
|
@ -107,6 +107,7 @@ public class Character : MonoBehaviour
|
|||
itemToPickup.transform.parent = model.transform;
|
||||
itemToPickup.gameObject.SetActive(false);
|
||||
|
||||
_carriedItemModel = model;
|
||||
_carriedInteractible = itemToPickup;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue