Interactor Raycast

Zaddo

Active member
I am very new to UIS. I am using UIS with UCC.

I want to set the pickup to work when the player looks at an object and hits the action key, i.e. is there a raycast option to trigger when the player is looking at an interactable? Is so, Is there an example of how to do this. I tried to find an example the training videos, manual and forums.

Thx.
 
Last edited:
No, unfortuntaly we don't have a built-in raycast option for pickups yet. The pickups are all Triggers, you can choose whether to pickup automatically when entering the trigger or using an input while in the trigger.

You should be able to create your own custom script for raycast pickup by checking for an ItemObject or Inventory component on the gameobject you are trying to pickup. Then you can copy those items, add them to the player inventory and destroy the pickup gameobject.

I hope that makes sense
 
No, unfortuntaly we don't have a built-in raycast option for pickups yet. The pickups are all Triggers, you can choose whether to pickup automatically when entering the trigger or using an input while in the trigger.

You should be able to create your own custom script for raycast pickup by checking for an ItemObject or Inventory component on the gameobject you are trying to pickup. Then you can copy those items, add them to the player inventory and destroy the pickup gameobject.

I hope that makes sense
Is there documentation explaining how to use input to pick up items? Item pickup scrip only has Pickup On Trigger Enter option
 
@yakuzza You can whether you wish to auto pickup items from the inventory Interactor on the character. The input is defined in the InventoryInput.

Note that v1.1.5 will release soon and the InventoryInput will become obselete. The input will be defined directly on the Inventory Interactor.
 
Top