6 February 2021

HO3 : Design of an interaction

Structure

This tutorial is structured as follow :

Requirements

This hands-on is based on the final outcome of the setup of a basic scene for the Oculus Quest hands-on. Thus you can directly checkout the last commit and create a new branch for this hands-on.

Reload the baseline project

If your working directory is not clean (i.e. you have non committed changes), you can stash your work or commit your changes if you want to be able to recover those changes later.

Make sure your work is stashed or committed before the following instruction as it will erase all data

From the root directory of your project you can run :

rm -rf *

If you did not add a tag on your baseline commit you can retrieve its hash with the following command :

git log

Otherwise you can directly checkout the commit of the basic integration of the oculus framework with the following command :

git checkout player_rig_set -f

As we plan to develop a new feature we can create a new branch to store our next development commits :

git checkout -b develop_basic_interaction

Design a simple interaction

Online documentation

You can find the official documentation containing buttons names and features directly from the Oculus website from the Oculus Developer webpage.

For instance depending on the kind of input you want to use, you may consider one of the following type :

Control type Description
OVRInput.Button Traditional buttons found on gamepads, Oculus Touch controllers, and the Oculus Go Controller touchpad and back button.
OVRInput.Touch Capacitive-sensitive control surfaces found on the Oculus Touch and Oculus Go Controller.
OVRInput.NearTouch Proximity-sensitive control surfaces found on the first generation Oculus Touch controller. Not supported on subsequent generations.
OVRInput.Axis1D One-dimensional controls such as triggers that report a floating point state.
OVRInput.Axis2D Two-dimensional controls including thumbsticks and the Oculus Go Controller touchpad. Reports a Vector2 state.

You can also use the button name according to your abstraction level targeted.

If you want to use raw button names you can use the raw mapping from this illustration :

Raw Mapping

If you want to use controller without bothering with it’s side you can use the individual mapping from the following schema :

Individual Mapping

If you want to use left and right controller with the higher abstraction level you can use the virtual mapping from this schema :

Virtual Mapping

Retrieve information from the controller

To retrieve whether a button is pressed or not we can use the static method Get ( aButton ) from the OVRInput class to retrieve the state of the button given as parameter.

The type of the button is one of the types listed in the table above and followed by the name of the targeted button.

For instance the A button can be represented as :

OVRInput.Button.One

Thus, to retrieve the state of the A button from the controller we can use, with the virtual mapping the following instruction, the next line :

OVRInput.Get( OVRInput.Button.One )

To implement this example let’s create a new script named MainPlayerController (PlayerController is already defined) attached to the OVRPlayerController :

Create New Script

using UnityEngine;

public class MainPlayerController : MonoBehaviour {

	/* ... */

	void Start () { /* ... */ }

	void Update () {
		if( OVRInput.Get( OVRInput.Button.One ) ) Debug.LogWarning( "Button is pressed" );
	}

	/* ... */
}

And copy paste the code above in the file MainPlayerController.cs within Visual Studio and save the file and push the application to the Oculus Quest.

N.B. : Pay attention to enable the Development Build and the Script Debugging for the build.

Now, if we launch logcat with the following command (and you can stop it with Ctrl-C) :

adb logcat Unity:W *:S

And press the A button, these kind of log will appears :

02-06 17:49:31.034 20385 20408 W Unity   : Button is pressed
02-06 17:49:31.034 20385 20408 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-06 17:49:31.034 20385 20408 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-06 17:49:31.034 20385 20408 W Unity   : UnityEngine.Logger:Log (UnityEngine.LogType,object)
02-06 17:49:31.034 20385 20408 W Unity   : UnityEngine.Debug:LogWarning (object)
02-06 17:49:31.034 20385 20408 W Unity   : MainPlayerController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/MainPlayerController.cs:10)
02-06 17:49:31.034 20385 20408 W Unity   :
02-06 17:49:31.034 20385 20408 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-06 17:49:31.034 20385 20408 W Unity   :
02-06 17:49:31.048 20385 20408 W Unity   : Button is pressed
02-06 17:49:31.048 20385 20408 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-06 17:49:31.048 20385 20408 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-06 17:49:31.048 20385 20408 W Unity   : UnityEngine.Logger:Log (UnityEngine.LogType,object)
02-06 17:49:31.048 20385 20408 W Unity   : UnityEngine.Debug:LogWarning (object)
02-06 17:49:31.048 20385 20408 W Unity   : MainPlayerController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/MainPlayerController.cs:10)
02-06 17:49:31.048 20385 20408 W Unity   :
02-06 17:49:31.048 20385 20408 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-06 17:49:31.048 20385 20408 W Unity   :
02-06 17:49:31.077 20385 20408 W Unity   : Button is pressed
02-06 17:49:31.077 20385 20408 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-06 17:49:31.077 20385 20408 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-06 17:49:31.077 20385 20408 W Unity   : UnityEngine.Logger:Log (UnityEngine.LogType,object)
02-06 17:49:31.077 20385 20408 W Unity   : UnityEngine.Debug:LogWarning (object)
02-06 17:49:31.077 20385 20408 W Unity   : MainPlayerController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/MainPlayerController.cs:10)
02-06 17:49:31.077 20385 20408 W Unity   :
02-06 17:49:31.077 20385 20408 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-06 17:49:31.077 20385 20408 W Unity   :
02-06 17:49:31.090 20385 20408 W Unity   : Button is pressed
02-06 17:49:31.090 20385 20408 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-06 17:49:31.090 20385 20408 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-06 17:49:31.090 20385 20408 W Unity   : UnityEngine.Logger:Log (UnityEngine.LogType,object)
02-06 17:49:31.090 20385 20408 W Unity   : UnityEngine.Debug:LogWarning (object)
02-06 17:49:31.090 20385 20408 W Unity   : MainPlayerController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/MainPlayerController.cs:10)
02-06 17:49:31.090 20385 20408 W Unity   :
02-06 17:49:31.090 20385 20408 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-06 17:49:31.090 20385 20408 W Unity   :

If you can now commit your changes (even if it doens’t work as expected as we are on a development branch) :

git add .
git commit -m "Add a simple primitive to detect user's action"

Grasping Objects

In this section we will create a Hand Controller and Anchors in order to be able to grasp virtual objects when :

Principle

The idea here is to add to each object an Anchor. Then, when the scene is loaded the Hand Controller will fetch all GameObject containing an Anchor and keep those references in memory. This Hand Controller will continuously wait for players actions (e.g. pressing a trigger) and look for objects (i.e. instances of Anchors) to interact with.

The condition triggering the interaction and it’s behavior will be implemented in the Anchor side as it will allow to deviate it’s behavior depending of the type of object we want to interact (e.g. we won’t grasp a small cube and a sword in the same way). The Anchor can however redispatch the interaction request to the player to make sure that the player is allowed to grasp the object (e.g. the hand is not already holding something or the player wears an item required to trigger the interaction).

Implementation

Let’s start by adding the new scripts HandController.cs and ObjectAnchor.cs in the project folder :

Add new scripts

Scripts created

The HandController.cs class

This script will be attached to both LeftControllerAnchor and RightControllerAnchor from the hierarchy of the OVRPlayerController and can be downloaded here : HandController.cs.

It is structured as described in the following sections.

Hand closed detection

In order to detect whether the hand is closed or not we must start by storing the hand side in the controller instance. This can be done using the following segment of code :

// Store the hand type to know which button should be pressed
public enum HandType : int { LeftHand, RightHand };
[Header( "Hand Properties" )]
public HandType handType;

We can then create the following method to know when the hand is closed based on the hand side :

// This method checks that the hand is closed depending on the hand side
protected bool is_hand_closed () {
	// Case of a left hand
	if ( handType == HandType.LeftHand ) return
		OVRInput.Get( OVRInput.Button.Three )                           // Check that the A button is pressed
		&& OVRInput.Get( OVRInput.Button.Four )                         // Check that the B button is pressed
		&& OVRInput.Get( OVRInput.Axis1D.PrimaryHandTrigger ) > 0.5     // Check that the middle finger is pressing
		&& OVRInput.Get( OVRInput.Axis1D.PrimaryIndexTrigger ) > 0.5;   // Check that the index finger is pressing


	// Case of a right hand
	else return
		OVRInput.Get( OVRInput.Button.One )                             // Check that the A button is pressed
		&& OVRInput.Get( OVRInput.Button.Two )                          // Check that the B button is pressed
		&& OVRInput.Get( OVRInput.Axis1D.SecondaryHandTrigger ) > 0.5   // Check that the middle finger is pressing
		&& OVRInput.Get( OVRInput.Axis1D.SecondaryIndexTrigger ) > 0.5; // Check that the index finger is pressing
}

N.B. : You can tweak the logical expression to trigger the grasp while pressing any of the A or B buttons rather than both at the same time.

Retrieving object anchors

As described previously we need to keep in memory the list of Anchors controllers can interact with. This can be done with those lines :

// Store all gameobjects containing an Anchor
// N.B. This list is static as it is the same list for all hands controller
// thus there is no need to duplicate it for each instance
static protected ObjectAnchor[] anchors_in_the_scene;
void Start () {
	// Prevent multiple fetch
	if ( anchors_in_the_scene == null ) anchors_in_the_scene = GameObject.FindObjectsOfType<ObjectAnchor>();
}

N.B. : As the list of Anchors is the same between all Hand Controllers this field can be made static to prevent having the same list stored in each Hand Controller instance.

Handling behavior

This part is a bit longer as it defines the behavior of the interaction detection. The first thing to do is to make sure we handle the behavior at each frame with the following forward of the Update() :

// Automatically called at each frame
void Update () { handle_controller_behavior(); }
Detect hand state events

Then, as we want to handle event occurring at edges (closing or opening a hand) we need to keep a track of the previous hand state :

// Store the previous state of triggers to detect edges
protected bool is_hand_closed_previous_frame = false;

And we can perform a quick check at the beginning of handle_controller_behavior() :

// Check if there is a change in the grasping state (i.e. an edge) otherwise do nothing
bool hand_closed = is_hand_closed();
if ( hand_closed == is_hand_closed_previous_frame ) return;
is_hand_closed_previous_frame = hand_closed;
Storing and attaching Anchors to the Hand Controller

To keep a track of the object attached to this controller we add an instance variable as follows :

// Store the object atached to this hand
// N.B. This can be extended by using a list to attach several objects at the same time
protected ObjectAnchor object_grasped = null;

As explained before : the behavior of the grasp will be implemented on the Anchor side. Thus, to store and attach the Anchor of index i in the Hand Controller we just need to perform :

// Store in memory the object grasped
object_grasped = anchors_in_the_scene[i];

// Log the grasp
Debug.LogWarningFormat( "{0} grasped {1}", this.transform.parent.name, object_grasped.name );

// Grab this object
object_grasped.attach_to( this );
Detaching an Anchors from the Hand Controller

As the instance of the attached object is already stored in the instance of the Hand Controller and the release behavior in the Anchor side, the release of the object is as easy as :

// Log the release
Debug.LogWarningFormat("{0} released {1}", this.transform.parent.name, object_grasped.name );

// Release the object
object_grasped.detach_from( this );
Detecting which object to grasp

As we already have a list of Anchors available we will simply iterate over those Anchors and simply retrieve the closest one in range of being grasped :

// Determine which object available is the closest from the left hand
int best_object_id = -1;
float best_object_distance = float.MaxValue;
float oject_distance;

// Iterate over objects to determine if we can interact with it
for ( int i = 0; i < anchors_in_the_scene.Length; i++ ) {

	// Skip object not available
	if ( !anchors_in_the_scene[i].is_available() ) continue;

	// Compute the distance to the object
	oject_distance = Vector3.Distance( this.transform.position, anchors_in_the_scene[i].transform.position );

	// Keep in memory the closest object
	// N.B. We can extend this selection using priorities
	if ( oject_distance < best_object_distance && oject_distance <= anchors_in_the_scene[i].get_grasping_radius() ) {
		best_object_id = i;
		best_object_distance = oject_distance;
	}
}

Thus if the best_object_id differs from -1 we know which id of the list of Anchors should be grasped.

Assembling the handle_controller_behavior() method

Once all the aforementioned elements are put together, this produce the following segment of code :

// Automatically called at each frame
void Update () { handle_controller_behavior(); }


// Store the previous state of triggers to detect edges
protected bool is_hand_closed_previous_frame = false;

// Store the object atached to this hand
// N.B. This can be extended by using a list to attach several objects at the same time
protected ObjectAnchor object_grasped = null;

/// <summary>
/// This method handles the linking of object anchors to this hand controller
/// </summary>
protected void handle_controller_behavior () {

	// Check if there is a change in the grasping state (i.e. an edge) otherwise do nothing
	bool hand_closed = is_hand_closed();
	if ( hand_closed == is_hand_closed_previous_frame ) return;
	is_hand_closed_previous_frame = hand_closed;



	//==============================================//
	// Define the behavior when the hand get closed //
	//==============================================//
	if ( hand_closed ) {

		// Log hand action detection
		Debug.LogWarningFormat( "{0} get closed", this.transform.parent.name );

		// Determine which object available is the closest from the left hand
		int best_object_id = -1;
		float best_object_distance = float.MaxValue;
		float oject_distance;

		// Iterate over objects to determine if we can interact with it
		for ( int i = 0; i < anchors_in_the_scene.Length; i++ ) {

			// Skip object not available
			if ( !anchors_in_the_scene[i].is_available() ) continue;

			// Compute the distance to the object
			oject_distance = Vector3.Distance( this.transform.position, anchors_in_the_scene[i].transform.position );

			// Keep in memory the closest object
			// N.B. We can extend this selection using priorities
			if ( oject_distance < best_object_distance && oject_distance <= anchors_in_the_scene[i].get_grasping_radius() ) {
				best_object_id = i;
				best_object_distance = oject_distance;
			}
		}

		// If the best object is in range grab it
		if ( best_object_id != -1 ) {

			// Store in memory the object grasped
			object_grasped = anchors_in_the_scene[best_object_id];

			// Log the grasp
			Debug.LogWarningFormat( "{0} grasped {1}", this.transform.parent.name, object_grasped.name );

			// Grab this object
			object_grasped.attach_to( this );
		}



	//==============================================//
	// Define the behavior when the hand get opened //
	//==============================================//
	} else if ( object_grasped != null ) {
		// Log the release
		Debug.LogWarningFormat("{0} released {1}", this.transform.parent.name, object_grasped.name );

		// Release the object
		object_grasped.detach_from( this );
	}
}

The ObjectAnchor.cs class

As described previously the ObjectAnchor handles the behavior of the object. The content of this file can be downloaded here : ObjectAnchor.cs and it’s content is detailed in the following sections :

Storing the grasping radius

In order to define the expected grasping radius we can expose a public variable we can later edit directly using the Unity3d’s Inspector with the following lines :

[Header( "Grasping Properties" )]
public float graspingRadius = 0.1f;

Also, to allow the HandController to access in read-only this value we can add the following method (other ways exists but let’s keep something simple) :

public float get_grasping_radius () { return graspingRadius; }

Handling availability

To know when the object is available or not we can simply store the Hand Controller this Anchor is attached to and set the object available when it is attached to any Hand Controller :

// Store the hand controller this object will be attached to
protected HandController hand_controller = null;

public bool is_available () { return hand_controller == null; }

Attaching the object to a Hand Controller

To simulate a grasp we will simply place the Anchor object into the referential of the controller to fix the position of the Anchor in the Hand Controller referential.

Thus we need to keep a track of the original object’s referential :

// Store initial transform parent
protected Transform initial_transform_parent;
void Start () {
	initial_transform_parent = transform.parent;
}

Then to attach the object to the Hand Controller we can simply set the new referential as follows :

public void attach_to ( HandController hand_controller ) {
	// Store the hand controller in memory
	this.hand_controller = hand_controller;

	// Set the object to be placed in the hand controller referential
	transform.SetParent( hand_controller.transform );
}

Conversely, the release can be performed like this :

public void detach_from ( HandController hand_controller ) {
	// Make sure that the right hand controller ask for the release
	if ( this.hand_controller != hand_controller ) return;

	// Detach the hand controller
	this.hand_controller = null;

	// Set the object to be placed in the original transform parent
	transform.SetParent( initial_transform_parent );
}

Flush the content of MainPlayerController.cs

As for now the test of the button detection is no longer useful in the MainPlayerController.cs we can override it’s content with :

using UnityEngine;

public class MainPlayerController : MonoBehaviour {}

Now all the components required to handle the grasp of the objects are ready and the only remaining task is to place them in the scene.

Creating objects to grasp

We can start by creating some small cubes to grasp :

Create cube

And adjust its size :

Adjust cube size

And create several copies with different explicit names :

Clone cubes

To differentiate those cubes we can create simple Materials :

Create material

And adjusts its name and color :

Edit material

Then you just need to drag the material on the associated cube :

Drag material

Add Anchors

Now we can select our 3 small cubes and add our newly created Object Anchor :

Search object anchor

And select our script :

Add Object Anchor script

N.B. : We can directly change the value of the Grasping Radius from the Inspector View :

Inspector view of grasping radius

Attach Hand Controllers

Finally, we can add our Hand Controller to the LeftControllerAnchor and RightControllerAnchor from the hierarchy of the OVRPlayerController. We can select both destinations items in the hierarchy of the scene :

Select both hand anchors

As previously, search for our Hand Controller script :

Select hand controller script

We can also take advantage of the selection to also bind these controllers to the Main Player Controller.

N.B. : As no Anchor use the Main Player Controller this step is not compulsory yet but will be useful for the next hands-on.

List main player controller

Add select the single instance in the scene :

Select main player controller

And finally, for the RightControllerAnchor instance of the Hand Controller, let’s change the Hand Type to Right Hand :

Change hand side

Expected result

Now that the build is pushed to the Oculus Quest / Oculus Quest 2 (Ctrl + B) we can test the application and look for bugs :

At the same time we can observe in logs the following entries detailing the exact interactions behavior :

--------- beginning of system
--------- beginning of tracking
--------- beginning of main
02-07 13:51:01.340 31473 31495 E Unity   : DllNotFoundException: AudioPluginOculusSpatializer
02-07 13:51:01.340 31473 31495 E Unity   :   at (wrapper managed-to-native) ONSPAudioSource.OSP_SetGlobalVoiceLimit(int)
02-07 13:51:01.340 31473 31495 E Unity   :   at ONSPAudioSource.OnBeforeSceneLoadRuntimeMethod () [0x00001] in C:\Users\mathias\Desktop\unity_projects\cs444_project__mathias_delahaye\Assets\Oculus\Spatializer\scripts\ONSPAudioSource.cs:41
02-07 13:51:01.340 31473 31495 E Unity   :
02-07 13:51:07.276 31473 31495 W Unity   : RightHandAnchor get closed
02-07 13:51:07.276 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:07.276 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:07.276 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:07.276 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:07.276 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:07.276 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:07.276 31473 31495 W Unity   :
02-07 13:51:07.276 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:07.276 31473 31495 W Unity   :
02-07 13:51:07.277 31473 31495 W Unity   : RightHandAnchor grasped cube_red
02-07 13:51:07.277 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:07.277 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:07.277 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:07.277 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:07.277 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:106)
02-07 13:51:07.277 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:07.277 31473 31495 W Unity   :
02-07 13:51:07.277 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:07.277 31473 31495 W Unity   :
02-07 13:51:08.289 31473 31495 W Unity   : LeftHandAnchor get closed
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:08.289 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:08.289 31473 31495 W Unity   :
02-07 13:51:08.289 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:08.289 31473 31495 W Unity   :
02-07 13:51:08.289 31473 31495 W Unity   : LeftHandAnchor grasped cube_white
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:08.289 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:106)
02-07 13:51:08.289 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:08.289 31473 31495 W Unity   :
02-07 13:51:08.289 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:08.289 31473 31495 W Unity   :
02-07 13:51:09.068 31473 31495 W Unity   : LeftHandAnchor released cube_white
02-07 13:51:09.068 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:09.068 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:09.068 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:09.068 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:09.068 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:09.068 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:09.068 31473 31495 W Unity   :
02-07 13:51:09.068 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:09.068 31473 31495 W Unity   :
02-07 13:51:09.249 31473 31495 W Unity   : RightHandAnchor released cube_red
02-07 13:51:09.249 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:09.249 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:09.249 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:09.249 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:09.249 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:09.249 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:09.249 31473 31495 W Unity   :
02-07 13:51:09.249 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:09.249 31473 31495 W Unity   :
02-07 13:51:09.848 31473 31495 W Unity   : LeftHandAnchor get closed
02-07 13:51:09.848 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:09.848 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:09.848 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:09.848 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:09.848 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:09.848 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:09.848 31473 31495 W Unity   :
02-07 13:51:09.848 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:09.848 31473 31495 W Unity   :
02-07 13:51:10.308 31473 31495 W Unity   : LeftHandAnchor released cube_white
02-07 13:51:10.308 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:10.308 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:10.308 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:10.308 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:10.308 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:10.308 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:10.308 31473 31495 W Unity   :
02-07 13:51:10.308 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:10.308 31473 31495 W Unity   :
02-07 13:51:10.614 31473 31495 W Unity   : LeftHandAnchor get closed
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:10.614 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:10.614 31473 31495 W Unity   :
02-07 13:51:10.614 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:10.614 31473 31495 W Unity   :
02-07 13:51:10.614 31473 31495 W Unity   : LeftHandAnchor grasped cube_blue
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:10.614 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:106)
02-07 13:51:10.614 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:10.614 31473 31495 W Unity   :
02-07 13:51:10.614 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:10.614 31473 31495 W Unity   :
02-07 13:51:12.089 31473 31495 W Unity   : LeftHandAnchor released cube_blue
02-07 13:51:12.089 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:12.089 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:12.089 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:12.089 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:12.089 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:12.089 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:12.089 31473 31495 W Unity   :
02-07 13:51:12.089 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:12.089 31473 31495 W Unity   :
02-07 13:51:12.772 31473 31495 W Unity   : RightHandAnchor get closed
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:12.772 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:12.772 31473 31495 W Unity   :
02-07 13:51:12.772 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:12.772 31473 31495 W Unity   :
02-07 13:51:12.772 31473 31495 W Unity   : RightHandAnchor grasped cube_white
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:12.772 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:106)
02-07 13:51:12.772 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:12.772 31473 31495 W Unity   :
02-07 13:51:12.772 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:12.772 31473 31495 W Unity   :
02-07 13:51:14.401 31473 31495 W Unity   : RightHandAnchor released cube_white
02-07 13:51:14.401 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:14.401 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:14.401 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:14.401 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:14.401 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:14.401 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:14.401 31473 31495 W Unity   :
02-07 13:51:14.401 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:14.401 31473 31495 W Unity   :
02-07 13:51:15.111 31473 31495 W Unity   : RightHandAnchor get closed
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:75)
02-07 13:51:15.111 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:15.111 31473 31495 W Unity   :
02-07 13:51:15.111 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:15.111 31473 31495 W Unity   :
02-07 13:51:15.111 31473 31495 W Unity   : RightHandAnchor grasped cube_red
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:15.111 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:106)
02-07 13:51:15.111 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:15.111 31473 31495 W Unity   :
02-07 13:51:15.111 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:15.111 31473 31495 W Unity   :
02-07 13:51:17.422 31473 31495 W Unity   : RightHandAnchor released cube_red
02-07 13:51:17.422 31473 31495 W Unity   : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
02-07 13:51:17.422 31473 31495 W Unity   : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
02-07 13:51:17.422 31473 31495 W Unity   : UnityEngine.Logger:LogFormat (UnityEngine.LogType,string,object[])
02-07 13:51:17.422 31473 31495 W Unity   : UnityEngine.Debug:LogWarningFormat (string,object[])
02-07 13:51:17.422 31473 31495 W Unity   : HandController:handle_controller_behavior () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:119)
02-07 13:51:17.422 31473 31495 W Unity   : HandController:Update () (at C:/Users/mathias/Desktop/unity_projects/cs444_project__mathias_delahaye/Assets/HandController.cs:47)
02-07 13:51:17.422 31473 31495 W Unity   :
02-07 13:51:17.422 31473 31495 W Unity   : (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
02-07 13:51:17.422 31473 31495 W Unity   :

Commit

If the project works as expected it the right moment to make a small commit of our project state and merge the development branch develop_basic_interaction into the master one :

# Commit
git add .
git commit -m "Implement a simple interaction using Touch Controllers"

# Merge
git checkout master
git merge develop_basic_interaction --no-ff
git tag basic_interaction_implemented -a -m "Integration of the basic integration into the sample scene"

# Push
git push --all
git push --tags

From now you can express your creativity to add more effects (e.g. as gravity, progressive snapping, sparkles, etc.) to make your interaction amazing !

Please feel free to use the forum if you have a question or want to give your feedback on this hands-on !