You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(Pointers): use appropriate tip for determining pointer origin
Previously the Pointer and UIPointer would use the transform of the
controller for the pointer origin and forward, but for SteamVR due
to different controllers being at different orientations it would
use a custom origin via the `GenerateControllerPointerOrigin` method.
This is not required as the `tip/attach` GameObject in a SteamVR
controller is already at the correct orientation for determining the
appropriate pointer origin.
This fix now ensures this tip is used for determining the pointer
origin and the `GenerateControllerPointerOrigin` class has been
deprecated as no other SDKs used it except for SteamVR and SteamVR
already has a built in mechanism for dealing with this complication.
The Pointer and UIPointer also have a new `Attached To` parameter
which can be used to determine which GameObject the pointer is actually
attached to, which helps when determining the pointer origin as if
the pointer is not attached to a controller.
The `Controller` parameter has also been deprecated and brought into
line with other scripts that correctly name it `Controller Events`.
Copy file name to clipboardExpand all lines: Assets/VRTK/Documentation/API.md
+5-102Lines changed: 5 additions & 102 deletions
Original file line number
Diff line number
Diff line change
@@ -1249,7 +1249,8 @@ Provides a basis of being able to emit a pointer from a specified GameObject.
1249
1249
* **Select After Hover Duration:** The amount of time the pointer can be over the same collider before it automatically attempts to select it. 0f means no selection attempt will be made.
1250
1250
* **Interact With Objects:** If this is checked then the pointer will be an extension of the controller and able to interact with Interactable Objects.
1251
1251
* **Grab To Pointer Tip:** If `Interact With Objects` is checked and this is checked then when an object is grabbed with the pointer touching it, the object will attach to the pointer tip and not snap to the controller.
1252
-
* **Controller:** An optional controller that will be used to toggle the pointer. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
1252
+
* **Attached To:** An optional GameObject that determines what the pointer is to be attached to. If this is left blank then the GameObject the script is on will be used.
1253
+
* **Controller Events:** An optional Controller Events that will be used to toggle the pointer. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
1253
1254
* **Interact Use:** An optional InteractUse script that will be used when using interactable objects with pointer. If this is left blank then it will attempt to get the InteractUse script from the same GameObject and if it cannot find one then it will attempt to get it from the attached controller.
1254
1255
* **Custom Origin:** A custom transform to use as the origin of the pointer. If no pointer origin transform is provided then the transform the script is attached to is used.
1255
1256
@@ -7864,8 +7865,9 @@ Provides the ability to interact with UICanvas elements and the contained Unity
7864
7865
* **Click Method:** Determines when the UI Click event action should happen.
7865
7866
* **Attempt Click On Deactivate:** Determines whether the UI click action should be triggered when the pointer is deactivated. If the pointer is hovering over a clickable element then it will invoke the click action on that element. Note: Only works with `Click Method = Click_On_Button_Up`
7866
7867
* **Click After Hover Duration:** The amount of time the pointer can be over the same UI element before it automatically attempts to click it. 0f means no click attempt will be made.
7867
-
* **Controller:** The controller that will be used to toggle the pointer. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
7868
-
* **Pointer Origin Transform:** A custom transform to use as the origin of the pointer. If no pointer origin transform is provided then the transform the script is attached to is used.
7868
+
* **Attached To:** An optional GameObject that determines what the pointer is to be attached to. If this is left blank then the GameObject the script is on will be used.
7869
+
* **Controller Events:** The Controller Events that will be used to toggle the pointer. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
7870
+
* **Custom Origin:** A custom transform to use as the origin of the pointer. If no pointer origin transform is provided then the transform the script is attached to is used.
7869
7871
7870
7872
### Class Variables
7871
7873
@@ -10075,17 +10077,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
10075
10077
10076
10078
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
10084
-
* Returns
10085
-
* `Transform` - A generated Transform that contains the custom pointer origin.
10086
-
10087
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
10088
-
10089
10080
#### GetControllerLeftHand/1
10090
10081
10091
10082
> `public abstract GameObject GetControllerLeftHand(bool actual = false);`
@@ -10707,17 +10698,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
10707
10698
10708
10699
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
10716
-
* Returns
10717
-
* `Transform` - A generated Transform that contains the custom pointer origin.
10718
-
10719
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
10720
-
10721
10701
#### GetControllerLeftHand/1
10722
10702
10723
10703
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -11324,17 +11304,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
11324
11304
11325
11305
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
11333
-
* Returns
11334
-
* `Transform` - A generated Transform that contains the custom pointer origin.
11335
-
11336
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
11337
-
11338
11307
#### GetControllerLeftHand/1
11339
11308
11340
11309
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -11966,17 +11935,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
11966
11935
11967
11936
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
11975
-
* Returns
11976
-
* `Transform` - A generated Transform that contains the custom pointer origin.
11977
-
11978
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
11979
-
11980
11938
#### GetControllerLeftHand/1
11981
11939
11982
11940
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -12600,17 +12558,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
12600
12558
12601
12559
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
12609
-
* Returns
12610
-
* `Transform` - A generated Transform that contains the custom pointer origin.
12611
-
12612
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
12613
-
12614
12561
#### GetControllerLeftHand/1
12615
12562
12616
12563
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -13234,17 +13181,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
13234
13181
13235
13182
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
13243
-
* Returns
13244
-
* `Transform` - A generated Transform that contains the custom pointer origin.
13245
-
13246
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
13247
-
13248
13184
#### GetControllerLeftHand/1
13249
13185
13250
13186
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -13867,17 +13803,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
13867
13803
13868
13804
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
13876
-
* Returns
13877
-
* `Transform` - A generated Transform that contains the custom pointer origin.
13878
-
13879
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
13880
-
13881
13806
#### GetControllerLeftHand/1
13882
13807
13883
13808
> `public override GameObject GetControllerLeftHand(bool actual = false)`
@@ -14489,17 +14414,6 @@ The GetControllerByIndex method returns the GameObject of a controller with a sp
14489
14414
14490
14415
The GetControllerOrigin method returns the origin of the given controller.
* `GameObject parent` - The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.
15120
-
* Returns
15121
-
* `Transform` - A generated Transform that contains the custom pointer origin.
15122
-
15123
-
The GenerateControllerPointerOrigin method can create a custom pointer origin Transform to represent the pointer position and forward.
15124
-
15125
15028
#### GetControllerLeftHand/1
15126
15029
15127
15030
> `public override GameObject GetControllerLeftHand(bool actual = false)`
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Base/SDK_BaseController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,7 @@ public virtual void OnControllerReady(ControllerHand hand)
320
320
/// </summary>
321
321
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
322
322
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
323
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Daydream/SDK_DaydreamController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
137
137
/// </summary>
138
138
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
139
139
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
140
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Fallback/SDK_FallbackController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
99
99
/// </summary>
100
100
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
101
101
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
102
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/HyperealVR/SDK_HyperealVRController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
133
133
/// </summary>
134
134
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
135
135
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
136
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Oculus/SDK_OculusController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -218,6 +218,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
218
218
/// </summary>
219
219
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
220
220
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
221
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Simulator/SDK_SimController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
156
156
/// </summary>
157
157
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
158
158
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
159
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/SteamVR/SDK_SteamVRController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -221,6 +221,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
221
221
/// </summary>
222
222
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
223
223
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
224
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/SDK/Unity/SDK_UnityController.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,7 @@ public override Transform GetControllerOrigin(VRTK_ControllerReference controlle
230
230
/// </summary>
231
231
/// <param name="parent">The GameObject that the origin will become parent of. If it is a controller then it will also be used to determine the hand if required.</param>
232
232
/// <returns>A generated Transform that contains the custom pointer origin.</returns>
233
+
[System.Obsolete("GenerateControllerPointerOrigin has been deprecated and will be removed in a future version of VRTK.")]
0 commit comments