Exemplo n.º 1
0
        public override Vector3 GetMovementDirection()
        {
            float movDir = CVirt.CybSDK_VirtDevice_GetMovementDirection(this.devicePtr);

            return(new Vector3(
                       Mathf.Cos(movDir * Mathf.PI - Mathf.PI / 2.0f),
                       0.0f,
                       -Mathf.Sin(movDir * Mathf.PI - Mathf.PI / 2.0f)
                       ).normalized);
        }
Exemplo n.º 2
0
        public override Vector3 GetPlayerOrientation()
        {
            float playerOrient = CVirt.CybSDK_VirtDevice_GetPlayerOrientation(this.devicePtr);

            return(new Vector3(
                       Mathf.Cos(playerOrient * 2.0f * Mathf.PI - Mathf.PI / 2.0f),
                       0.0f,
                       -Mathf.Sin(playerOrient * 2.0f * Mathf.PI - Mathf.PI / 2.0f)
                       ).normalized);
        }
Exemplo n.º 3
0
        public static CVirtDevice CreateDeviceMockupXInput()
        {
            IntPtr dev = CVirt.CybSDK_VirtDevice_CreateDeviceMockupXInput();

            if (dev.ToInt32() != 0)
            {
                return(new CVirtDeviceNative(dev));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 4
0
        public static CVirtDevice FindDevice()
        {
            IntPtr dev = CVirt.CybSDK_VirtDevice_FindDevice();

            if (dev.ToInt32() != 0)
            {
                return(new CVirtDeviceNative(dev));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 5
0
 public override float GetMovementSpeed()
 {
     return(CVirt.CybSDK_VirtDevice_GetMovementSpeed(this.devicePtr));
 }
Exemplo n.º 6
0
 public override void ResetPlayerHeight()
 {
     CVirt.CybSDK_VirtDevice_ResetPlayerHeight(this.devicePtr);
 }
Exemplo n.º 7
0
 public override float GetPlayerHeight()
 {
     return(CVirt.CybSDK_VirtDevice_GetPlayerHeight(this.devicePtr));
 }
Exemplo n.º 8
0
 public override bool Close()
 {
     return(CVirt.CybSDK_VirtDevice_Close(this.devicePtr));
 }
Exemplo n.º 9
0
 public override void HapticSetGain(int gain)
 {
     CVirt.CybSDK_VirtDevice_HapticSetGain(this.devicePtr, gain);
 }
Exemplo n.º 10
0
 public override bool HasHaptic()
 {
     return(CVirt.CybSDK_VirtDevice_HasHaptic(this.devicePtr));
 }
Exemplo n.º 11
0
        /////////////////////////////////////////////////////////////////////////


        public override void ResetPlayerOrientation()
        {
            CVirt.CybSDK_VirtDevice_ResetPlayerOrientation(this.devicePtr);
        }
Exemplo n.º 12
0
 /// <summary>
 /// <para>Get raw movement direction data</para>
 /// <para>Return value of 0 = Moving forwards</para>
 /// <para>Return value of 1 = Moving backwards</para>
 /// </summary>
 /// <returns>Float either 0 or 1</returns>
 public override float GetDirectionRaw()
 {
     // Get raw direction data: Float value either 0 or 1
     return(CVirt.CybSDK_VirtDevice_GetMovementDirection(this.devicePtr));
 }
Exemplo n.º 13
0
 public override void HapticStop()
 {
     CVirt.CybSDK_VirtDevice_HapticStop(this.devicePtr);
 }
Exemplo n.º 14
0
 public override void StartDFU()
 {
     CVirt.CybSDK_VirtDevice_StartDFU(this.devicePtr);
 }
Exemplo n.º 15
0
 public override void HapticSetVolume(int volume)
 {
     CVirt.CybSDK_VirtDevice_HapticSetVolume(this.devicePtr, volume);
 }
Exemplo n.º 16
0
 public override void HapticSetFrequency(int frequency)
 {
     CVirt.CybSDK_VirtDevice_HapticSetFrequency(this.devicePtr, frequency);
 }
Exemplo n.º 17
0
 ///////////////////////////////////////////////////////////
 // Following methods added by Adrian Barberis on 7/5/2018
 //
 /// <summary>
 /// <para>Get Raw orientation data</para>
 /// <para>Moving the rotational ring of the Virtualizer Rig to the right will cause the vaue to increase.</para>
 /// <para>Moving to the left will cause the value to decrease.</para>
 /// <para>Moving to the left when the current value is zero will return a number around 0.99 and continued movement will decrease the value</para>
 /// </summary>
 /// <returns>float ranging from 0 to 0.99</returns>
 public override float GetOrientationRaw()
 {
     return(CVirt.CybSDK_VirtDevice_GetPlayerOrientation(this.devicePtr));
 }
Exemplo n.º 18
0
 public override void SetHapticBaseplate(float value)
 {
     CVirt.CybSDK_VirtDevice_SetHapticBaseplate(this.devicePtr, value);
 }
Exemplo n.º 19
0
 public override bool IsOpen()
 {
     return(CVirt.CybSDK_VirtDevice_IsOpen(this.devicePtr));
 }
Exemplo n.º 20
0
 public override void SetHapticBaseplate(int value)
 {
     CVirt.CybSDK_VirtDevice_SetHapticBaseplate(this.devicePtr, (short)value);
 }