public static bool GetInputPose(int playerID, byte device, byte control, ref Vector3 position, ref Quaternion rotation) { var pos = new AXRVector3D(); var rot = new AXRVector4D(); if (ocs_GetInputPose(playerID, device, control, ref pos, ref rot) == false) { return(false); } position = pos.toVector3(); rotation = rot.toQuaternion(); return(true); }
public static bool GetInputRaycastHit(byte device, byte control, ref Vector3 origin, ref Vector3 hitPosition, ref Vector3 hitNormal) { var ori = new AXRVector3D(); var pos = new AXRVector3D(); var norm = new AXRVector3D(); if (ocs_GetInputRaycastHit(device, control, ref ori, ref pos, ref norm) == false) { return(false); } origin = ori.toVector3(); hitPosition = pos.toVector3(); hitNormal = norm.toVector3(); return(true); }