This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Calculates screen-space position a world space object. Useful for showing something on screen that is not visible in VR. | |
/// For example, it can be used to update the position of a marker that highlights the gaze of the player, using eye tracking. | |
/// </summary> | |
/// <param name="camera">The camera used for VR rendering.</param> | |
/// <param name="worldPos">World position of a point.</param> | |
/// <returns>Screen position of a point.</returns> | |
static Vector2 WorldToScreenVR(Camera camera, Vector3 worldPos) | |
{ | |
Vector3 screenPoint = camera.WorldToViewportPoint(worldPos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UXF; | |
using ViveSR.anipal.Eye; | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// Contains methods for creating routines which can be used as coroutines to easy lerp over a time period. | |
/// | |
/// Example moves an object between two points over 5 seconds: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import random | |
clr_red = (255, 0, 0) | |
clr_green = (0, 255, 0) | |
clr_blue = (0, 0, 255) | |
txt_red = "red" | |
txt_green = "green" | |
txt_blue = "blue" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"example_string": "aaa", | |
"example_bool": true, | |
"example_int": 3, | |
"example_float": "3.14", | |
"example_array": [ | |
1, | |
2, | |
3, | |
4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// Used to test the ExtendedCoroutine interface. | |
public class CoroutineTest : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
IEnumerator Start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PositionAdjuster : MonoBehaviour | |
{ | |
// amount by which each button press changes the height by | |
public float heightIncrement = 0.01f; | |
// keys on the keyboard we wish to use for adjusting position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public static class Texture2DExtensions | |
{ | |
public static void Add(this Texture2D tex1, Texture2D tex2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SteamVROverlayCheck : MonoBehaviour | |
{ | |
public GameObject warningDisplay; | |
void OnEnable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"n_practice_trials": 5, | |
"n_main_trials": 10, | |
"size": 1 | |
} |
NewerOlder