Skip to content

Instantly share code, notes, and snippets.

View DraconInteractive's full-sized avatar

Dracon Interactive DraconInteractive

View GitHub Profile
@DraconInteractive
DraconInteractive / Test.cs
Created September 21, 2022 04:14
WebGL Disappearing RawImage
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
public class Test : MonoBehaviour
{
public RawImage rawImage;
@DraconInteractive
DraconInteractive / BowTarget.cs
Created August 21, 2022 09:08
Basic logic for VR Bow mechanic
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class BowTarget : MonoBehaviour
{
// Collection / context pattern
public static List<BowTarget> All = new List<BowTarget>();
@DraconInteractive
DraconInteractive / Arrow.cs
Created August 21, 2022 08:50
Basic logic flow for VR Bow mechanic
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Arrow : MonoBehaviour
{
[Header("Main")]
public Transform tip;
public float movementSpeed;
public float ttl = 5;
@DraconInteractive
DraconInteractive / BowModule.cs
Created August 21, 2022 00:35
Basic logic flow for VR Bow mechanic
using System;
using System.Collections;
using System.Collections.Generic;
using UltimateXR.Avatar;
using UltimateXR.Core;
using UltimateXR.Core.Components.Composite;
using UltimateXR.Devices;
using UltimateXR.Manipulation;
using UnityEngine;
using UnityEngine.Events;
@DraconInteractive
DraconInteractive / ClimbingHold.cs
Created August 8, 2022 10:43
Basic Uxr Climbing
using System;
using System.Collections;
using System.Collections.Generic;
using UltimateXR.Avatar;
using UltimateXR.Core;
using UltimateXR.Core.Components.Composite;
using UltimateXR.Manipulation;
using UnityEngine;
public class ClimbingHold : UxrGrabbableObjectComponent<ClimbingHold>
@DraconInteractive
DraconInteractive / VRClimbOverview
Last active August 8, 2022 07:49
basic overview of a vr climbing mechanic
public Transform climbingAnchor;
public float climbRadius = 0.1f;
private ConfigurableJoint Joint;
void OnGrab ()
{
if (ClimbGrab)
{
// Player is now attached to climbable object
}
public IEnumerator Type1 () {
AddResult("T1");
//Do logic for type 1
SetResult("T1", Result.Success);
}
public IEnumerator Type2 () {
AddResult("T2");
//Conditional logic for type 2
if (false) {
@DraconInteractive
DraconInteractive / APIController.cs
Last active July 14, 2019 23:12
API Controller for simple data storage
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using SimpleJSON;
public class APIController : MonoBehaviour
{
public static string mainURL = @"https://testurl.com";
@DraconInteractive
DraconInteractive / OVRInputSet.cs
Created June 15, 2019 03:07
Easy reference for Oculus Quest Unity Input
public class OVRInputSet
{
public Vector2 leftStick, rightStick;
public float leftTrigger, rightTrigger;
public float leftHand, rightHand;
float lastLeftP, lastRightP, lastLeftH, lastRightH;
@DraconInteractive
DraconInteractive / Literary Review Resources
Created April 17, 2019 14:38
A collation of sources for my Master of Creative Industries major project
Template:
Name
Author(s)
Link
---------------------------------------------------------------------------------------------------------
Game Definitions: A Wittgensteinian Approach
Jonne Arjoranta
http://gamestudies.org/1401/articles/arjoranta