Change the following settings of the parameter: - Enum Name: ButtonAlias - Int Value: 3 At least I think the int value of the enum should be 3 if the order they're stated in the documents are correct. Otherwise you'll have to find out what the int representation of the TriggerPress value is ... or write a wrapper class that's called by Makinom and calls VRTK.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
How much does it cost? Can you write a VRTK plugin for ORK and Makinom? I am willing to pay for your help. I sent the project package to you, please download it in the attachment.
The issue is that the VRTK_ControllerEvents class isn't a static class, accessible from anywhere and at any time, which is required by ORK's custom inputs, i.e. you'll need to write a wrapper class, e.g.:
public static class VRTK_ORK { private static VRTK_ControllerEvents controllerEvents;
public static VRTK_ControllerEvents ControllerEvents { get { if(controllerEvents == null) { controllerEvents = GameObject.FindObjectOfType<VRTK_ControllerEvents>(); } return controllerEvents; } }
Changing the Class Name to VRTK_ORK should get this running - but you'll need a set up game object in your scenes with the VRTK_ControllerEvents component attached.
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Hello, I copied the code according to your tutorial, but Makinom seems to have a bug, and Makinom can't call static classes! There is no VRTK_ORK static class in this, I have experimented with static classes scripts of other scripts and can't be called!
using System.Collections; using System.Collections.Generic; using UnityEngine; using VRTK; using static VRTK.VRTK_ControllerEvents;
namespace VRTK { static public class VRTK_ORK { private static VRTK_ControllerEvents controllerEvents;
static public VRTK_ControllerEvents ControllerEvents { get
The Class Name dropdown only shows the names of all classes, so you just have to type in the name. If it doesn't work, try removing the static keyword from the class and don't use a namespace (although that shouldn't interfere with it).
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Only from the class, not from the anything else - and don't make it a MonoBehaviour. Using custom input requires static functions to be called, not components added to a game object.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Hello, happy new year! I have experimented as you said, and it has not worked. I hope you have time to study the support issues of VRTK, I am willing to pay!
- Enum Name: ButtonAlias
- Int Value: 3
At least I think the int value of the enum should be 3 if the order they're stated in the documents are correct. Otherwise you'll have to find out what the int representation of the TriggerPress value is ... or write a wrapper class that's called by Makinom and calls VRTK.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
bbvdd.com/d/201812081539059ee.png
How much does it cost? Can you write a VRTK plugin for ORK and Makinom? I am willing to pay for your help.
I sent the project package to you, please download it in the attachment.
bbvdd.com/d/20181208154746ava.png/a>
bbvdd.com/d/201812081558176pw.png
bbvdd.com/d/201812081622553ox.png
public static class VRTK_ORK
{
private static VRTK_ControllerEvents controllerEvents;
public static VRTK_ControllerEvents ControllerEvents
{
get
{
if(controllerEvents == null)
{
controllerEvents = GameObject.FindObjectOfType<VRTK_ControllerEvents>();
}
return controllerEvents;
}
}
public static bool IsButtonPressed(ButtonAlias button)
{
if(VRTK_ORK.ControllerEvents != null)
{
return VRTK_ORK.ControllerEvents.IsButtonPressed(button);
}
return false;
}
}
Changing the Class Name to VRTK_ORK should get this running - but you'll need a set up game object in your scenes with the VRTK_ControllerEvents component attached.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
There is no VRTK_ORK static class in this, I have experimented with static classes scripts of other scripts and can't be called!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK;
using static VRTK.VRTK_ControllerEvents;
namespace VRTK
{
static public class VRTK_ORK
{
private static VRTK_ControllerEvents controllerEvents;
static public VRTK_ControllerEvents ControllerEvents
{
get
{
if (controllerEvents == null)
{
controllerEvents = GameObject.FindObjectOfType<VRTK_ControllerEvents>();
}
return controllerEvents;
}
}
static public bool IsButtonPressed(ButtonAlias button)
{
if (VRTK_ORK.ControllerEvents != null)
{
return VRTK_ORK.ControllerEvents.IsButtonPressed(button);
}
return false;
}
}
}
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK;
using static VRTK.VRTK_ControllerEvents;
public class VRTK_ORK : MonoBehaviour
{
public VRTK_ControllerEvents controllerEvents;
public VRTK_ControllerEvents ControllerEvents
{
get
{
if (controllerEvents == null)
{
controllerEvents = GameObject.FindObjectOfType<VRTK_ControllerEvents>();
}
return controllerEvents;
}
}
public bool IsButtonPressed(ButtonAlias button)
{
if (ControllerEvents != null)
{
return ControllerEvents.IsButtonPressed(button);
//return ControllerEvents.triggerPressed;
}
return false;
}
}
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!