Skip to content

Instantly share code, notes, and snippets.

View flarb's full-sized avatar

Ralph Barbagallo flarb

View GitHub Profile
@flarb
flarb / StareButton.cs
Created May 23, 2015 22:48
This is a 'stare button' for Google Cardboard apps where you just want to stare at a button over time to select it.
using System;
using System.Reflection;
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
public class StareButton : MonoBehaviour, IEventSystemHandler, IPointerExitHandler, IPointerEnterHandler, ISelectHandler {
@flarb
flarb / .gitignore
Created July 3, 2016 08:19
Proper gitignore for HoloLens project (includes UWP folder)
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Uu]WP/
/Assets/AssetStoreTools*
# Autogenerated VS/MD solution and project files
ExportedObj/
@flarb
flarb / Controller.cs
Created December 30, 2016 22:52
Simple Daydream controller shake / direction detection. Modified from Daydream sample controller code and a low pass filter example I found on stack overflow
using UnityEngine;
using System.Collections;
public class Controller : MonoBehaviour {
public GameObject controllerPivot;
public float accelerometerUpdateInterval = 1f / 60f;
public float lowPassKernelWidthInSeconds = 1f;
public float shakeDetectionThreshold = 2f;