Sockets for Fun and … Inventory

Tyler Smallwood
2 min readJan 24, 2024

Objective: Use sockets to eat, carry a key, and wear a hat.

We can have fun with sockets. Following my last article we will adjust a little bit.

I added three socket interactors onto the Xr Origin.

Next I updated the interaction lays to include the new type of items.

Just like the Key, I added XR grab interactable to the crown and taco!

I then set the interaction layers correctly, the crown got hat and the taco got food.

With the crown set up I can now ware it! I also got the key pocket set up so the key will stay on my body.

Eating food is similar. The only difference for the food is the socket. Under Interactor Events -> Hover, I have a script that deletes food as if we are eating them!

With that eating is so easy, all you need to do is bring it to your face.

Thank you for reading.

--

--

Tyler Smallwood

I am passonate on learning to program and use Unity to become a skillful Unity Developer