Beispiel #1
0
    public void ReturnInventoryItem(IDItem item)
    {
        item.itemCopyForInventory.SetParent(null);
        item.itemCopyForInventory.SetParent(item.transform);
        item.itemCopyForInventory.localPosition = Vector3.zero;

        item.ShowOrHideInventoryCopy(false);
    }
Beispiel #2
0
    public void PlaceItemToView(IDItem item)
    {
        item.itemCopyForInventory.SetParent(null);
        item.itemCopyForInventory.SetParent(itemViewerPosePosition);
        item.itemCopyForInventory.localPosition = Vector3.zero + item.itemCopyViewerOffsetPos;
        item.itemCopyForInventory.localRotation = Quaternion.identity * Quaternion.Euler(item.itemCopyViewerRotAdjustment);
        Vector3 newScale = item.itemCopyForInventory.localScale;

        newScale.Set(item.itemCopyViewerScale.x, item.itemCopyViewerScale.y, item.itemCopyViewerScale.z);
        item.itemCopyForInventory.localScale = newScale;

        item.ShowOrHideInventoryCopy(true);
    }