A complete and robust Cardboard Input SDK for Unity in C#
People
Repo info
Activity
Justin Scott
@JScott
And wrap that in your boolean
So when the trigger is down from the trigger.OnDown event, which sets the boolean to true, it moves forward exactly like you would for any other game
And then when it comes up, trigger.OnUp flips that boolean off
Make sense?
Pavlos Nicolaou
@p4vlos
perfect
Justin Scott
@JScott
That's what I like to hear :)
Pavlos Nicolaou
@p4vlos
and I will add this to CardboardControlManager ?
Justin Scott
@JScott
I would add it to your Character Controller directly. In the case of the Demo Scene, I'd put it in ExampleCharacterController.cs
Pavlos Nicolaou
@p4vlos
okay perfect
Justin Scott
@JScott
The less you touch stuff in the CardboardControl directory for your game, the easier it'll be to keep up to date as I roll out improvements. That's general good practice for Unity I'd say
Pavlos Nicolaou
@p4vlos
thank you mate :)
Justin Scott
@JScott
You're very welcome. It gets lonely in here without people asking questions so don't hesitate to reach out
Pavlos Nicolaou
@p4vlos
haha
Justin Scott
@JScott
Oh and totally let me know how using framework is. Unity doesn't give me a lot of ways to see how users are doing unless I pester people for Asset Store ratings
Pavlos Nicolaou
@p4vlos
I feel you because I am working on 3 different projects and one is this one that I am using Google Cardboard
Yea I will for sure
Justin Scott
@JScott
And speaking of updates, @/all of you that integrate through the Asset Store (thanks for your support :o ) are getting CC+ v3.5.2 as soon as it gets approved. That's Cardboard SDK v0.6, super helpful Gaze additions, and simple support for the official Google reticle which the base Cardboard SDK makes really difficult to use for some reason.
JScott @JScott slithers back into hibernation until someone has questions
Pavlos Nicolaou
@p4vlos
@JScott I did what you said to me and the code has 0 errors I committed it so you can see it on github but I don't know what I am doing wrong with the packages. I followed the instructions to import the google sdk and also the CardboardControlManager but I didn't put them one as a child
is this the problem?
Justin Scott
@JScott
@p4vlos I saw the code you had in the PR and noticed that you're using Cardboard.SDK.Triggered. Look again at the code in ExampleCharacterController.cs and notice the event-based framework. Triggered is a boolean that you have to constantly poll for and will be true once per full click, if that. trigger.OnUp and trigger.OnDown are events that get sent off when the trigger is detected as going up or down
You should be able to avoid using Cardboard.SDK anything. CC+ events cover the trigger handling for you
I might be adding a moving forward example soon since I got a request from someone else today about it. I can only move so fast but it shouldn't be hard to add and it might help make more sense of the idea I'm trying to convey
Pavlos Nicolaou
@p4vlos
ok I am still working on it and I will try to fix it