Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/*copied from ""*/
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