Blog.

Blog 07 - VR interactable boxes

Nichita Railean

Introduction

The boxes or products are the most import thing in a warehouse and a wharehosue simulator game. The idea was to make a interatible box that you can pick up, drop, move and rotate. Aswell it needed to have a nice texture and destruction mechanics.

The texture

From the asset store we got the box texture with the materials and the mesh.

Physics

The box prefab has the following components

Mesh filter - Holds the mesh data (like vertices, edges, faces) for the object. It defines the shape of the object.

Mesh renderer - Responsible for drawing the mesh from the Mesh Filter on the screen. It works with materials to give the object color and texture.

Box Collider - A box-shaped collision component that defines how the object physically interacts with other colliders in the scene. It's used for collision detection.

Rigid Body - Adds physics properties to the object, like mass, drag, and gravity, allowing it to react to forces and collisions within the physics engine.

XR Grab interactible - A component specifically for XR (extended reality) environments. It enables the object to be interactively grabbed and manipulated by the user in a VR or AR setting.

XR General Grab Transformer - Another XR-specific component that allows for more general transformations (like scaling, rotation) of the object when it is grabbed in an XR environment.

Box manager - Custom script responsible for the box logic like hp, collision logic, hierachy, etc.