-
Notifications
You must be signed in to change notification settings - Fork 0
CustomRewired
The tools you are using change every 2-6 months. A way to avoid breaking your project is to linked it to a facade. Rewired is a very good one.
Example, MRTK Version: 2018 - V2 Beta
"PLEASE NOTE: This release is a significant breaking change from Mixed Reality Toolkit 2018.9.0 (released 2018/10/31) and all HoloToolkit releases."
Allows the application to work on several platform
It takes 2 x 10 minutes to compile application for Hololens! Build a simulator allows you to try your code in 20s instead of 20 minutes (Except when you try it to be sure everything is allright).
A price of 40€ is expensive for new users on Unity,
but pays 40€ to avoid losing days of work at 500€ per day.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Rewired_HandsAsJoystick_UI : Rewired_HandsAsJoystick
{
public Slider m_leftHandX;
public Slider m_leftHandY;
public Slider m_leftHandZ;
public Slider m_rightHandX;
public Slider m_rightHandY;
public Slider m_rightHandZ;
public Toggle m_triggerLeft;
public Toggle m_grabbingLeft;
public Toggle m_triggerRight;
public Toggle m_grabbingRight;
protected override float GetAxisInfo(int axisId)
{
switch (axisId)
{
case 0: return m_leftHandX.value;
case 1: return m_leftHandY.value;
case 2: return m_leftHandZ.value;
case 3: return m_rightHandX.value;
case 4: return m_rightHandY.value;
case 5: return m_rightHandZ.value;
default:
return 0f;
}
}
protected override bool GetButtonInfo(int buttonId)
{
switch (buttonId)
{
case 0: return m_triggerLeft.isOn;
case 1: return m_grabbingLeft.isOn;
case 2: return m_triggerRight.isOn;
case 3: return m_grabbingRight.isOn;
default:
return false;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rewired_HandsAsJoystick_OculusGo : Rewired_HandsAsJoystick
{
//https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovrinput/
protected override float GetAxisInfo(int axisId)
{
Vector2 touchAxis = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);
switch (axisId)
{
case 0: return -Mathf.Abs(touchAxis.x);
case 1: return touchAxis.y;
case 2: return 0f;
case 3: return -Mathf.Abs(touchAxis.x);
case 4: return touchAxis.y;
case 5: return 0f;
default:
return 0f;
}
}
protected override bool GetButtonInfo(int buttonId)
{
switch (buttonId)
{
case 0: return OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger);
case 1: return OVRInput.Get(OVRInput.Button.PrimaryTouchpad);
case 2: return OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger);
case 3: return OVRInput.Get(OVRInput.Button.PrimaryTouchpad);
default:
return false;
}
}
}
Warning: This course is not a released version.
For any questions, you can find me here:
https://eloistree.com
⚠ Version 1.0 ⚠
Main Objective:
- Learn the first step of using Hololens
- Give the will to create game with MR after the workshop
My Objective:
- Guess what will look like the 4-8 years technologies.
- Learn the limitations of Hololens for my future clients
- Have fun with Hololens
Let's code
-
Day 2: Hello Hololens
-
Day 3: Ready to use
-
Day 4: Move Your A**
Where to go now ?
- Day 5: Gaming industry QA
- First try with Hololens
- Move Your Ass
- Cthululu
- UWP
- Tool:
- Hololens Scan
⚠ Incomplete ⚠
- Learn From Others
- Games
- Applications
- Daily Users ?
- Reviews
- UWP
- Holo & Unity
- Army & Hololens
- After the workshop
Note I am taking during the construction of this workshop