-
-
Save KzoNag/4cddb6e7cf8d2da46660b1ba2ed0b849 to your computer and use it in GitHub Desktop.
ブログ用 - ハンドトラッキングの入力状態定義
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[StructLayout(LayoutKind.Explicit, Size = 38)] | |
public struct HandDeviceState : IInputStateTypeInfo | |
{ | |
public FourCC format => new FourCC('P', 'C', 'H', 'D'); | |
[InputControl(usage = "TrackingState", layout = "Integer", offset = 0)] | |
[FieldOffset(0)] | |
public int trackingState; | |
[InputControl(usage = "IsTracked", layout = "Button", offset = 4)] | |
[FieldOffset(4)] | |
public bool isTracked; | |
[InputControl(usage = "DevicePosition", offset = 5)] | |
[FieldOffset(5)] | |
public Vector3 devicePosition; | |
[InputControl(usage = "DeviceRotation", offset = 17)] | |
[FieldOffset(17)] | |
public Quaternion deviceRotation; | |
[InputControl(usage = "Grip", layout = "Axis", offset = 33)] | |
[FieldOffset(33)] | |
public float grip; | |
[InputControl(alias = "gripPressed", usage = "GripButton", layout = "Button", offset = 37)] | |
[FieldOffset(37)] | |
public bool gripButton; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment