Skip to content

Instantly share code, notes, and snippets.

@Sarthakg91
Sarthakg91 / BaseColliderControl.cs
Last active August 2, 2019 22:13
button press detection
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class BaseColliderControl : MonoBehaviour
{
public GameObject rightController;
public GameObject leftController;
public SteamVR_Action_Vibration hapticAction;
@Sarthakg91
Sarthakg91 / FreezeLocal.cs
Created August 1, 2019 23:22
Constraints on the movement of a button when it is pressed
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FreezeLocal : MonoBehaviour
{
public bool lockX;
public bool lockY;
public bool lockZ;
@Sarthakg91
Sarthakg91 / ControllerCollisonDetector.cs
Created August 1, 2019 20:18
Detecting controller collisions in Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class ControllerCollisonDetector : MonoBehaviour
{
private bool inCollision = false;
private string colliderName = "";