Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created January 28, 2017 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/962fcae8d97d8d24d60f3eb744bd73f0 to your computer and use it in GitHub Desktop.
Save flushpot1125/962fcae8d97d8d24d60f3eb744bd73f0 to your computer and use it in GitHub Desktop.
/*copied from "https://developer.microsoft.com/en-us/windows/holographic/holograms_101"*/
using UnityEngine;
public class SphereCommands : MonoBehaviour
{
// Called by GazeGestureManager when the user performs a Select gesture
void OnSelect()
{
// If the sphere has no Rigidbody component, add one to enable physics.
if (!this.GetComponent<Rigidbody>())
{
var rigidbody = this.gameObject.AddComponent<Rigidbody>();
rigidbody.collisionDetectionMode = CollisionDetectionMode.Continuous;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment