Skip to content

Instantly share code, notes, and snippets.


The Stonefox thestonefox

View GitHub Profile
thestonefox / OrientationFollowPrimarySecondarySwapper.cs
Created May 24, 2022
Tilia Interactables Example of how to get two handed grabbing to work with an orientation grabbed object so either hand can be holding it
View OrientationFollowPrimarySecondarySwapper.cs
using System.Collections;
using Tilia.Interactions.Interactables.Interactables;
using Tilia.Interactions.Interactables.Interactables.Grab.Action;
using Tilia.Interactions.Interactables.Interactables.Grab.Provider;
using Tilia.Interactions.Interactables.Interactors;
using UnityEngine;
using Zinnia.Data.Collection.Stack;
public class OrientationFollowPrimarySecondarySwapper : MonoBehaviour
thestonefox / PrecisionFollowPrimarySecondarySwapper.cs
Created May 24, 2022
Tilia Interactables Example of how to get two handed grabbing to work with a precision grabbed object so either hand can be holding it
View PrecisionFollowPrimarySecondarySwapper.cs
using System.Collections;
using Tilia.Interactions.Interactables.Interactables;
using Tilia.Interactions.Interactables.Interactables.Grab.Provider;
using UnityEngine;
using Zinnia.Data.Collection.Stack;
public class PrecisionFollowPrimarySecondarySwapper : MonoBehaviour
private InteractableFacade interactable;
View gist:b694688fe4b0f9d31e768cf5e59039a4
  • Tutorials [Leaning Oriented] (Videos)
    • Small/Medium projects that go from blank state to a completed goal oriented project (e.g. make a kitchen you can teleport around and interact with things)
    • Predominately videos on the VRTK Youtube channel maybe split into a series (playlist) of videos perhaps no more than 10/15 minutes long each.
    • Feasible to have written tutorials but they would probably form chapters of a book
  • How To Guides [Goal Oriented] (Videos/Written)
    • Step by step guides on how to do something with VRTK such as set up a CameraRig, setup teleporting, set up a pointer. More advanced How To Guides could be how to customise a pointer, how to change the underlying structures of the interactable prefab, etc.
  • Perhaps a even split between written guides with video versions simply going through the guides. The written guide could contain a link to the video and the video could contain a link to the written guide. These guides would be self contained and the vide
thestonefox /
Created Nov 17, 2017
Blender 2.79 Key mappings to mimic Unity3d view navigation
import bpy
import os
def kmi_props_setattr(kmi_props, attr, value):
setattr(kmi_props, attr, value)
except AttributeError:
print("Warning: property '%s' not found in keymap item '%s'" %
(attr, kmi_props.__class__.__name__))
except Exception as e:
thestonefox / CustomTip.cs
Created Jul 16, 2016
A basic concept of how to implement a custom tip in VRTK
View CustomTip.cs
using UnityEngine;
using System.Collections;
using VRTK;
public class CustomTip : MonoBehaviour {
private VRTK_WorldPointer pointer;
private GameObject cubeCursor;
private GameObject capsuleCursor;
private MeshRenderer sphereCursor;
thestonefox / SteamVR_FirstPersonController.cs
Last active Mar 13, 2017
A Unity3d 5.3 script to add SteamVR functionality such as object interaction/grabbing/throwing, laser pointer and teleport movement with blink (Requires Unity SteamVR plugin)
View SteamVR_FirstPersonController.cs
// Purpose: Add player ability on SteamVR CameraRig to:
// * Trackpad press down: project laser pointer from Touch Controller
// * Trackpad release: teleport player with blink to laser point destination
// * Trigger click: grab any object that has a custom "Grabbable" tag applied
// * Trigger release: release the current grabbed object with relative force
// * Application Menu: reset the position of last grabbed object to controller
thestonefox / ViveCursor.cs
Last active Jun 5, 2019
A basic implementation of a laser pointer for the HTC Vive controllers in Unity3D
View ViveCursor.cs
using UnityEngine;
using System.Collections;
public class ViveCursor : MonoBehaviour {
public enum AxisType
thestonefox / apt-install
Created Feb 12, 2015
Recommended Ubuntu Dependencies
View apt-install
sudo apt-get update && sudo apt-get install git-core curl git build-essential libssl-dev libreadline-dev autoconf bison libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libncurses5-dev automake libtool libpq-dev fontconfig
thestonefox / phantomjs-install
Created Feb 11, 2015
Install PhantomJS (Run as sudo su)
View phantomjs-install
wget &&
mv phantomjs-1.9.7-linux-x86_64.tar.bz2 /usr/local/share/. &&
cd /usr/local/share/ &&
tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 &&
ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64 /usr/local/share/phantomjs &&
ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/bin/phantomjs
thestonefox / nodejs-install
Last active Aug 29, 2015
Ubuntu NodeJS Install (Requires sudo su)
View nodejs-install
apt-get install -y python-software-properties python &&
add-apt-repository ppa:chris-lea/node.js &&
echo "deb precise universe" >> /etc/apt/sources.list &&
apt-get -q -y update &&
apt-get install -y nodejs