Coder Social home page Coder Social logo

vrcontrolwheel's Introduction

VRControlWheel

A Segmented Control Wheel Designed For VR

Quick start

Download the Zip for this repo, and copy the ControlWheel script into your Unity Project.

Example Scene

To view the example scene and example script ConsolePrinter example, download this repo as a Zip and extract. With Unity, click Open Project, and navigate to where you extracted the Zip. Once the project is open, you can view and run the exmamle scene. Feel free to play around with the scene and ConsolePrinter example.

How It Works

The Control Wheel is a circular, segmented action selector. It is especially useful for VR, where button inputs are limited and non-diegetic UI is more appropriate.

You can attach the ControlWheel component to any GameObject. It can be controlled by another, more user-specific script by calling:

  • AddControlWheelAction / AddControlWheelActions (one / many ControlWheelSegments)
  • RemoveControlWheelAction (string name)
  • DisplayControlWheel ()
  • HideControlWheel ()
  • HighlightSectionAtLocation (Vector2 locationInCircle)
  • Select (Vector2 locationInCircle)
    • Calls the associated action for the segment found by locationInCirlce

Preferred Position:

If a segment is initialised with a preferred postion, the ControlWheel will tyr its best to honour the segment's position. However, for an odd number of segments, the segment might not appear where intended. Also, if two segments have the same preferred position, the one added first will always be assigned the position and any subsequent will be treated as if they had no preferred position.

vrcontrolwheel's People

Stargazers

Sparky avatar

Watchers

James Cloos avatar Sparky avatar Elliot Winch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.