Author Topic: Toggling a cardboard autowalk function.  (Read 943 times)


  • Sr. Member
  • ****
  • Posts: 338
    • View Profile
Toggling a cardboard autowalk function.
« on: May 03, 2016, 12:01:51 AM »

This has been tackled elsewhere on the forum, I hope you dont mind that I revisit it, Id rather do it all in PlayMaker than use a little cs that I dont understand.

Basically I want to link the Magnet Button on Google cardboard up to the autowalk on the player.
Im using a gaze control on the floor to toggle autowalk, and this works fine for those without the magnet, but for ease of use Id like the magnet to work too.

First, I found the required property on the Cardboard script. "Triggered". This is a bool that sends a TRUE value for one frame after the magnet is pulled.
I do this by dragging the cardboard component into PlayMaker and use "Get Property".

AND I have done the same thing with the autowalk on my player control.
I can see that the variable for auto walk toggles correctly between 1 and 0 when I use the gaze control. SO I want the Triggered function to "tap" into that, so that the gaze control and the magnet button to not "get out of sync" with each other. EG: I want the gaze control to show WALKING even when the magnet button is pulled.

As its a toggle, Im having trouble knowing how to set this up. AND its impossible to test without doing a full build, which, frankly takes about an hour on my crappy computer... and every build usually generating some Xcode hell... (some impossible to understand errors that I must google and fix.

Best way to do this?

« Last Edit: May 03, 2016, 02:15:29 AM by markfrancombe »