示例#1
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);
        }
示例#2
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));
 }