Giter Club home page Giter Club logo

cardboard-controls's Introduction

Cardboard Controls+

Cardboard Controls+ is all you need to develop the best Cardboard games in Unity. These scripts enhance the Google VR SDK for Unity with event-driven improvements for discrete trigger control, orientation tilting, gaze raycasting, and reticle control. Stop limiting your creative options!

See the package directory for details.

See the examples directory for thorough documentation.

If you like Cardboard Controls+ and want to show your support, please check out the Asset Store page. It's an easy way to show your appreciation and get stable updates with Asset Store integration. I also love it when you leave a rating or review because it helps other people find the project.

cardboard-controls's People

Contributors

jscott avatar kkopsa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cardboard-controls's Issues

Magnetic Events don't work

I'm using a Nexus 5, and for me none of the Magnetic Inputs work.
If i put my Device in my Cardboard the Magnetic States don't work and the Click event doesn't recognize Clicks.
However if i open the Cardboard and move my Device closer and or away from the Device i get some kind of Input.

I would love to use this for a little game and won't mind to pay fpr the Unity Package if it works.
I would be glad if you could help me fix this problem.

Gaze collision with UI elements?

Hi there!

Is there a way to make this plugin work with UI elements out of the box?
I am trying to measure the gaze time and it seems to work perfectly with 3D objects when their collider is enabled but I have no such luck with UI.
Thanks a lot!

Reversing polarity for magnet controls

If the magnet trigger accidentally goes off while you put your device into a Cardboard v1, you may end up in a state where down registers as up and up as down.

If you give the magnetometer a second to return to the ambient, low-magnitude readings then it should reset. This means a workaround for now may just taking the device out, waiting a moment, and putting it back in again.

Magnetometer gets stuck at near-magnet levels

Sometimes after I pull a device out of a Cardboard v1 enclosure, the ambient magnetometer magnitude stays at its peak for a while before dropping, seemingly arbitrarily. The ratio doesn't get affected much so it still detects triggers but it can be falsely triggered as "stable" which allows triggers when there shouldn't be that tend to mess up the up/down state.

Magnetic Events don't work in Cardboard SDK 0.6

Cardboard SDK was recently updated to v0.6 and it seems like the magnetic events (trigger.OnDown, trigger.OnUp and trigger.OnClick) no longer fire on the actual device in CardboardControl v3.4. Using the raw Cardboard.SDK.Triggered invocation from the SDK seems to work correctly though. Debug controls for these work correctly in the Unity editor when pressing the appropriate key on the keyboard.

It'd be great to get this working as we're trying to develop a space shooter and need to be able to hold down the magnetic control to activate forward thrusters for our ship. Currently we have to use 'clicks' to toggle the thrusters on and off which isn't as intuitive.

Jostle breaks magnet held

When I'm moving forward in Castle and I jostle the device I will stop moving. Jostle should stop new input from being taken in but shouldn't stop ongoing input. It might be triggering up before I halts as well, research of the input charts is required.

Prefab is missing 4 scripts

The script references of 4 scripts of the prefab are missing (and also all the scripts from the demo scene).
I've tried to re-import the project again, once before importing Google Cardboard sdk and once after, both shows the demo scene is broken.
BTW, demo scene has a "Missing Prefab" object, i guess this is the CardboardControlManager object.

What scripts should I link into this object?
and what about the 2 other scripts? to what object should I link them?

Trouble swapping live devices from Cardboard v1 to Cardboard v2

When you take your device out of a Cardboard v1 and start using it in a Cardboard v2 without restarting the application, you're prone to breaking the state of the application. I don't foresee a lot of people doing this but it's worth noting even if it's not worth fixing.

Triggering Delegates in custom code

Similarly to Vive Grip, users have a need to trigger events outside of the normal scope of what kicks them off. For example, an external bluetooth device firing off the trigger command could expand what you can do with the Cardboard device.

Currently you can almost do this by just triggering the Delegate, e.g. cardboard.trigger.OnDown(this). However, there are a lot of side effects that happen in CardboardControlTrigger.cs that won't get fired this way.

Custom pointers

If I move Highlight, ClearHighlight, Hide, and Show and all their data structures from CardboardControlsPointer to a script on the PointerPrefab itself then devs can define their own pointers. Someone could create a more Google-esque pointer or design their own, all of which would probably be better than my default.

Cardboard 2.0 lever doesn't work

It'd be really easy to make work and would flow very easily into the existing API. However, I don't personally own one and thus can't develop that compatibility yet.

Use base SDK to improve TriggerState detection

There's been a long-running problem with CC+ where it's very difficult to differentiate between up and down. I generally assume that the first change of state is down but that's not always correct. This leads to things like ResetMagnetState() being a necessity.

I've been wondering for a while if I could leverage that the base SDK can tell me when the trigger has come back up to be more precise. In pseudo-code it'd be something like:

private TriggerState CheckTriggerState() {
  if (TriggerMoved()) {
    return BaseCardboardSDKMagnetTriggered() ? TriggerState.Up : TriggerState.Down;
  }
}

Note that theoretically we can remove the idea of TriggerState.Neutral and be able to say in absolute terms whether or not it's Up or Down instead of "Positive" and "Negative".

I'm sure it's not as easy as all of that but the idea is pretty simple.

Missing Scripts/prefabs

Hi, im trying this plugin in Unity 5.0.1f1 (32-bit), when i load the demo scene, there are a missing prefab, i was thinking that CardboardControlManager was the missing one, but when i load that prefab, all of his scripts are missing (also bigcube and ExampleCharacter has missing scripts), any ideas?
prtscr capture_2

Cannot build from demo scene

Unity 5.6.2f1, latest CardboardControls+ from GitHub.

I am doing the following:

  • Creating new project
  • Change platform to Android
  • Import CardboardControls+ from package
  • (tried this with/without) Commenting out based on alert to remove mentions of cardboard from Android Manifest
  • Enable virtual reality in player settings, add Cardboard to the list
  • Opening the demo scene
  • Build

Playing scene in Unity works, but building to Android always leads to instant force-close on phone. Can run GVR fine on phone.

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.