Class ControllerTool
vCast controller device tools setting.
vCast 控制器裝置的工具設定。
Inherited Members
Namespace: Votanic.vXR.vCast.IO
Assembly: Votanic.vXR.dll
Syntax
[Serializable]
public class ControllerTool : Element
Constructors
ControllerTool()
Declare a controller tool.
宣告一個控制器工具。
Declaration
public ControllerTool()
ControllerTool(String, Boolean, Boolean, Single, Boolean, Int32[], Int32[], Vector3, Vector3, WandRay, Glove)
Declare a controller tool.
宣告一個控制器工具。
Declaration
public ControllerTool(string name, bool autoSwitch, bool enableScan, float scanLength, bool priorityLayer, int[] detectLayers, int[] ignoreLayers, Vector3 position, Vector3 rotation, WandRay wandRay, Glove glove)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Tool name |
System.Boolean | autoSwitch | Enable auto switch tool if true |
System.Boolean | enableScan | Scan objects to determine this tool should be applied or not |
System.Single | scanLength | Tool detection scan distance |
System.Boolean | priorityLayer | The raycast will be checked by the order of Detect Layers |
System.Int32[] | detectLayers | The layers related to this tool |
System.Int32[] | ignoreLayers | The layers need to be ignored |
UnityEngine.Vector3 | position | Relative position on controller |
UnityEngine.Vector3 | rotation | Relative euler angles on controller |
WandRay | wandRay | Wand ray setting of this tool. |
Glove | glove | Glove setting of this tool. |
Fields
autoSwitch
When current tool is this tool, all the tools which apply "Enable Scan" will scan objects and auto switch to the first detected tool.
當這個工具為目前使用的工具時,所有使用了「啟用掃瞄」的工具將會掃瞄物件,並且在偵測到第一個應轉換的工具時自動轉換。
Declaration
[Tooltip("When current tool is this tool, all the tools which apply \"Enable Scan\" will scan objects and auto switch to the first detected tool.\n當這個工具為目前使用的工具時,所有使用了「啟用掃瞄」的工具將會掃瞄物件,並且在偵測到第一個應轉換的工具時自動轉換。")]
public bool autoSwitch
Field Value
Type | Description |
---|---|
System.Boolean |
detectLayers
The layers related to this tool.
與這個工具相關的層級。
Declaration
[Tooltip("The layers related to this tool.\n與這個工具相關的層級。")]
public List<int> detectLayers
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Int32> |
enableScan
When current tool applies "Auto Switch", scan objects and determine this tool should be switched on or not.
當目前使用的工具使用「自動轉換」時,掃描物件並且判斷應否轉換為這個工具。
Declaration
[Tooltip("When current tool applies \"Auto Switch\", scan objects and determine this tool should be switched on or not.\n當目前使用的工具使用「自動轉換」時,掃描物件並且判斷應否轉換為這個工具。")]
public bool enableScan
Field Value
Type | Description |
---|---|
System.Boolean |
glove
Glove setting of this tool.
這個工具的手套設定。
Declaration
[Tooltip("Glove setting of this tool.\n這個工具的手套設定。")]
public Glove glove
Field Value
Type | Description |
---|---|
Glove |
ignoreLayers
The layers need to be ignored.
需要忽略的層級。
Declaration
[Tooltip("The layers need to be ignored.\n需要忽略的層級。")]
public List<int> ignoreLayers
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Int32> |
position
Relative position on controller.
在控制器的相對位置。
Declaration
[Tooltip("Relative position on controller.\n在控制器的相對位置。")]
public Vector3 position
Field Value
Type | Description |
---|---|
UnityEngine.Vector3 |
priorityLayer
The raycast will be checked by the order of Detect Layers.
Raycast 將會根據 Detect Layers 的順序檢查。
Declaration
[Tooltip("The raycast will be checked by the order of Detect Layers.\nRaycast 將會根據 Detect Layers 的順序檢查。")]
public bool priorityLayer
Field Value
Type | Description |
---|---|
System.Boolean |
rotation
Relative euler angles on controller.
在控制器的相對角度。
Declaration
[Tooltip("Relative euler angles on controller.\n在控制器的相對角度。")]
public Vector3 rotation
Field Value
Type | Description |
---|---|
UnityEngine.Vector3 |
scanLength
Tool detection scan distance.
工具偵測掃瞄距離。
Declaration
[Tooltip("Tool detection scan distance.\n工具偵測掃瞄距離。")]
public float scanLength
Field Value
Type | Description |
---|---|
System.Single |
wandRay
Wand ray setting of this tool.
這個工具的操縱桿射線設定。
Declaration
[Tooltip("Wand ray setting of this tool.\n這個工具的操縱桿射線設定。")]
public WandRay wandRay
Field Value
Type | Description |
---|---|
WandRay |