Discussions

Ask a Question
Back to All

Attach instantiated object to hand from script.

Hi there, starting using NewtonVR from yesterday and its looks really amazing! However I want to ask a simple question, I want to instantiate a prefab and make it attached to one hand. I don't know how to handle this. Currently im doing:

GameObject item = Instantiate(itemPrefab);
NVRInteractableItem vrItem= item.GetComponent();
hand.BeginInteraction(vrItem);

But's its not working. In inspector each hand its empty on CurrentlyInteracting box.
How to do this?

Thanks!