Skip to content

LinceWorks/SimpleVR

Repository files navigation

Most updated version on https://gitlab.com/dacaes/SimpleVR

SimpleVR

SimpleVR_main

Unity3D VR lightweight framework.

Created by Daniel Castaño Estrella at Lince Works.

Contact: daniel@linceworks.com

License in LICENSE file.

IMPORTANT: Only SteamVR plugin dependency is included. Others should be downloaded and placed in Assets/Plugins folder.

Read the instructions to make sure everything works ok.

Index

SimpleVR capabilities

Instructions

SimpleVR dependencies

SimpleVR.Example dependencies

Recommended plugins

SimpleVR capabilities

SimpleVR is a lightweight framework for Unity3D that solves common issues and features every VR game needs.

Main features:

  • Locomotion and Teleportation
  • Object Manipulation
  • Management of walls and obstructions
  • Support SteamVR Input system
  • ...

It uses SteamVR plugin only to support its input system. You can map interactions with VR controllers with its editor.

Sample images and gifs

Note: When you read about walls, it means something that has a collider but not physics simulation (not RigidBody).

  • Locomotion (with joystick and head movement working together)
    • Example of head movement:
      • move_body
  • Easy teleport setup
    • CharacterVR class public methods:
      • MoveTo
      • SetPosition
      • LookAt
      • SetRotation
      • SetRotation
      • SetYawRotation
      • AddYawRotation
      • Rotate
  • Capsule and sphere Interactable detection
    • Interactable and Grabbables (inherits from Interactable) can be:
      • Ethereal: detectable through walls
      • Constrained Detection: Can't detect with capsule, only sphere
      • Undetectable: Can't be detected (can't interact with)
  • Attachment points for Grabbable gameObjects (don't depend on the pivot of the object to grab it)
    • attachment_point
  • Fade to black next to walls (depends on the direction player is looking at)
    • fade_next_wall
  • Can't grab objects through walls, even can't push objects through walls with hands or other objects, can't release object until it is outside a wall.
    • wall_interactables
    • can't grab the object until player moves to the other side of the wall
    • wall_interactables_2
  • Slots to store your objects
    • slots
    • Different slot types (Slot and Grabbable must match their Attachment Type Name to interact) and a slot can't have an Initial Grabbable (instantiates a Grabbable object on Start)
      • Slot
      • Grabbable
  • Linear Drive with positions and animations (Auto Return option: 1st drawer and animated cube)
    • linear_drive
  • Easy config with ScriptableObjects
    • DataVR
    • HandVRConstants
    • GrabbableConstants
    • InputBindings

Instructions

Download and open SimpleVR project with Unity 2018.3+

Download SimpleVR Dependencies (links below) and place them on Assets/Plugins folder (except SteamVR, it goes inside Assets folder directly).

Download SimpleVR.Example dependencies and Recommended plugins too, place them inside Assets/Plugins.

IMPORTANT: Probably you'll notice some errors at this point, continue with the tutorial and they will be fixed.

Since 2018.3, UnityEngine.SpatialTracking namespace (which is needed by SimpleVR) has been moved to a package.

To install it (or update it) go to Window > Package Manager and in Packages window, select All packages > XR Legacy Input Helpers and install or update.

package_manager

Create an Assembly Definition for QuickOutline plugin and SuperScience plugin:

  • Right click on the QuickOutline folder and SuperScience folder in the Project window, Create > Assembly Definition.

create_Assembly

Add the Assembly Definition Reference of UnityEngine.SpatialTracking (no the UnityEditor.SpatialTracking) to the SuperScience assembly definition and Apply.

assembly_definition_reference

Add assembly definitions to SimpleVR assembly, the same way, until it looks like:

simplevr_assembly_references

Be sure that LeftHand and RightHand gameObjects in CharacterVR.prefab have PoseProvider component and copy the Tunnelling component data as seen in the image to the camera gameObject.

tunnelling

After that, everything should be ok. If not, restart Unity Editor.

SimpleVR dependencies

SimpleVR.Example dependencies

InteractableFeedback.cs needs:

Recommended plugins

Releases

No releases published

Packages

No packages published

Languages