Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://assetstore.unity.com/packages/3d/props/electronics/barcode-scanner-177384

Scene Object

To start, we’ll add a Motive Scene Object to the “main” part of the scanner since this is the part the user will be using:

...

Pick up the Scanner

Now we want to make the main part of the reader grabbable. Right-click “main” and choose “Make Grabbable” from the Motive menu:

...

See Usable World Objects for more information about Usables. This action fires when the user points at an object and pulls the trigger. It uses a raycast. We want the raycast to originate from the light source, so let’s set the Raycast Transform:

...

Attach to Base

With these settings, the scanner will return to its base after you drop it, but sometimes the user will simply want to place the scanner back in its cradle. We can achieve this by making the scanner Attachable and making the base an Attachable Receiver.

...