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
chore(Pointer): rename world pointer to base pointer for consistency
All other base abstract classes are named `Base_`. It is more
appropriate for the World Pointer to be called Base Pointer as this
is more consistent with other scripts.
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Interactions/VRTK_InteractableObject.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ public enum ValidDropTypes
99
99
publicboolholdButtonToUse=true;
100
100
[Tooltip("If this is checked the object can be used only if it is currently being grabbed.")]
101
101
publicbooluseOnlyIfGrabbed=false;
102
-
[Tooltip("If this is checked then when a World Pointer beam (projected from the controller) hits the interactable object, if the object has `Hold Button To Use` unchecked then whilst the pointer is over the object it will run it's `Using` method. If `Hold Button To Use` is unchecked then the `Using` method will be run when the pointer is deactivated. The world pointer will not throw the `Destination Set` event if it is affecting an interactable object with this setting checked as this prevents unwanted teleporting from happening when using an object with a pointer.")]
102
+
[Tooltip("If this is checked then when a Base Pointer beam (projected from the controller) hits the interactable object, if the object has `Hold Button To Use` unchecked then whilst the pointer is over the object it will run it's `Using` method. If `Hold Button To Use` is unchecked then the `Using` method will be run when the pointer is deactivated. The world pointer will not throw the `Destination Set` event if it is affecting an interactable object with this setting checked as this prevents unwanted teleporting from happening when using an object with a pointer.")]
103
103
publicboolpointerActivatesUseAction=false;
104
104
[Tooltip("If this is set to `Undefined` then the global use alias button will use the object, setting it to any other button will ensure the override button is used to use this specific interactable object.")]
/// The basic teleporter updates the `[CameraRig]` x/z position in the game world to the position of a World Pointer's tip location which is set via the `WorldPointerDestinationSet` event. The y position is never altered so the basic teleporter cannot be used to move up and down game objects as it only allows for travel across a flat plane.
15
+
/// The basic teleporter updates the `[CameraRig]` x/z position in the game world to the position of a Base Pointer's tip location which is set via the `DestinationMarkerSet` event. The y position is never altered so the basic teleporter cannot be used to move up and down game objects as it only allows for travel across a flat plane.
16
16
/// </summary>
17
17
/// <remarks>
18
18
/// The Basic Teleport script is attached to the `[CameraRig]` prefab.
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Locomotion/VRTK_DashTeleport.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ public struct DashTeleportEventArgs
24
24
/// The dash teleporter extends the height adjust teleporter and allows to have the `[CameraRig]` dashing to a new teleport location.
25
25
/// </summary>
26
26
/// <remarks>
27
-
/// Like the basic teleporter and the height adjustable teleporter the Dash Teleport script is attached to the `[CameraRig]` prefab and requires a World Pointer to be available.
27
+
/// Like the basic teleporter and the height adjustable teleporter the Dash Teleport script is attached to the `[CameraRig]` prefab.
28
28
///
29
29
/// The basic principle is to dash for a very short amount of time, to avoid sim sickness. The default value is 100 miliseconds. This value is fixed for all normal and longer distances. When the distances get very short the minimum speed is clamped to 50 mps, so the dash time becomes even shorter.
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Pointers/VRTK_BasePointer.cs
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
// World Pointer|Pointers|10020
1
+
// Base Pointer|Pointers|10020
2
2
namespaceVRTK
3
3
{
4
4
usingUnityEngine;
5
5
6
6
/// <summary>
7
-
/// This abstract class provides any game pointer the ability to know the state of the implemented pointer. It extends the `VRTK_DestinationMarker` to allow for destination events to be emitted when the pointer cursor collides with objects.
7
+
/// This abstract class provides any game pointer the ability to know the state of the implemented pointer.
8
8
/// </summary>
9
9
/// <remarks>
10
-
/// The World Pointer also provides a play area cursor to be displayed for all cursors that utilise this class. The play area cursor is a representation of the current calibrated play area space and is useful for visualising the potential new play area space in the game world prior to teleporting. It can also handle collisions with objects on the new play area space and prevent teleporting if there are any collisions with objects at the potential new destination.
10
+
/// It extends the `VRTK_DestinationMarker` to allow for destination events to be emitted when the pointer cursor collides with objects.
11
11
///
12
-
/// The play area collider does not work well with terrains as they are uneven and cause collisions regularly so it is recommended that handling play area collisions is not enabled when using terrains.
12
+
/// As this is an abstract class, it cannot be applied directly to a game object and performs no logic.
@@ -26,7 +26,8 @@ public enum pointerVisibilityStates
26
26
Always_Off
27
27
}
28
28
29
-
[Header("Generic Pointer Settings",order=2)]
29
+
[Header("Base Pointer Settings",order=2)]
30
+
30
31
[Tooltip("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.")]
31
32
publicVRTK_ControllerEventscontroller=null;
32
33
[Tooltip("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.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Pointers/VRTK_BezierPointer.cs
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,10 @@ namespace VRTK
18
18
///
19
19
/// `VRTK/Examples/036_Controller_CustomCompoundPointer' shows how to display an object (a teleport beam) only if the teleport location is valid, and can create an animated trail along the tracer curve.
20
20
/// </example>
21
-
publicclassVRTK_BezierPointer:VRTK_WorldPointer
21
+
publicclassVRTK_BezierPointer:VRTK_BasePointer
22
22
{
23
23
[Header("Bezier Pointer Settings",order=3)]
24
+
24
25
[Tooltip("The length of the projected forward pointer beam, this is basically the distance able to point from the controller position.")]
25
26
publicfloatpointerLength=10f;
26
27
[Tooltip("The number of items to render in the beam bezier curve. A high number here will most likely have a negative impact of game performance due to large number of rendered objects.")]
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Pointers/VRTK_DestinationMarker.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ public struct DestinationMarkerEventArgs
33
33
/// This abstract class provides the ability to emit events of destination markers within the game world. It can be useful for tagging locations for specific purposes such as teleporting.
34
34
/// </summary>
35
35
/// <remarks>
36
-
/// It is utilised by the `VRTK_WorldPointer` for dealing with pointer events when the pointer cursor touches areas within the game world.
36
+
/// It is utilised by the `VRTK_BasePointer` for dealing with pointer events when the pointer cursor touches areas within the game world.
Copy file name to clipboardExpand all lines: Assets/VRTK/Scripts/Pointers/VRTK_PlayAreaCursor.cs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ namespace VRTK
4
4
usingUnityEngine;
5
5
6
6
/// <summary>
7
-
/// The Play Area Cursor is used in conjunction with a World Pointer script and displays a representation of the play area where the pointer cursor hits.
7
+
/// The Play Area Cursor is used in conjunction with a Base Pointer script and displays a representation of the play area where the pointer cursor hits.
8
8
/// </summary>
9
9
/// <example>
10
10
/// `VRTK/Examples/012_Controller_PointerWithAreaCollision` shows how a Bezier Pointer with the Play Area Cursor and Collision Detection enabled can be used to traverse a game area but not allow teleporting into areas where the walls or other objects would fall into the play area space enabling the user to enter walls.
@@ -13,7 +13,7 @@ public class VRTK_PlayAreaCursor : MonoBehaviour
13
13
{
14
14
[Tooltip("Determines the size of the play area cursor and collider. If the values are left as zero then the Play Area Cursor will be sized to the calibrated Play Area space.")]
[Tooltip("If this is ticked then if the play area cursor is colliding with any other object then the pointer colour will change to the `Pointer Miss Color` and the `WorldPointerDestinationSet` event will not be triggered, which will prevent teleporting into areas where the play area will collide.")]
16
+
[Tooltip("If this is ticked then if the play area cursor is colliding with any other object then the pointer colour will change to the `Pointer Miss Color` and the `DestinationMarkerSet` event will not be triggered, which will prevent teleporting into areas where the play area will collide.")]
17
17
publicboolhandlePlayAreaCursorCollisions=false;
18
18
[Tooltip("If this is ticked then if the user's headset is outside of the play area cursor bounds then it is considered a collision even if the play area isn't colliding with anything.")]
19
19
publicboolheadsetOutOfBoundsIsCollision=false;
@@ -121,9 +121,9 @@ public virtual void ToggleState(bool state)
121
121
122
122
protectedvirtualvoidAwake()
123
123
{
124
-
if(!GetComponent<VRTK_WorldPointer>())
124
+
if(!GetComponent<VRTK_BasePointer>())
125
125
{
126
-
Debug.LogError("VRTK_PlayAreaCursor requires a VRTK_WorldPointer script attached to the same object.");
126
+
Debug.LogError("VRTK_PlayAreaCursor requires a VRTK_BasePointer script attached to the same object.");
0 commit comments