Added teleporter documentation
This commit is contained in:
		
							parent
							
								
									555c5fd2d8
								
							
						
					
					
						commit
						59558c09e3
					
				@ -97,7 +97,7 @@ namespace Passer {
 | 
				
			|||||||
    /// * BeginDrag: is sent to the object in focus when a click has started and the focus point starts to move
 | 
					    /// * BeginDrag: is sent to the object in focus when a click has started and the focus point starts to move
 | 
				
			||||||
    /// * Drag: is sent to the object in focus while the focus point changes during a click
 | 
					    /// * Drag: is sent to the object in focus while the focus point changes during a click
 | 
				
			||||||
    /// * EndDrag: is sent to the object in focus when the click ends after the focus point started to move
 | 
					    /// * EndDrag: is sent to the object in focus when the click ends after the focus point started to move
 | 
				
			||||||
    [HelpURLAttribute("https://passervr.com/documentation/humanoid-control/tools/interaction-pointer/")]
 | 
					    [HelpURLAttribute("https://passervr.com/apis/HumanoidControl/Unity/class_passer_1_1_interaction_pointer.html")]
 | 
				
			||||||
    public class InteractionPointer : MonoBehaviour {
 | 
					    public class InteractionPointer : MonoBehaviour {
 | 
				
			||||||
        protected static void DebugLog(string s) {
 | 
					        protected static void DebugLog(string s) {
 | 
				
			||||||
#if UNITY_EDITOR
 | 
					#if UNITY_EDITOR
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,74 @@ namespace Passer {
 | 
				
			|||||||
    using Humanoid;
 | 
					    using Humanoid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// <summary>The teleporter is a simple tool to teleport transforms</summary>
 | 
					    /// <summary>The teleporter is a simple tool to teleport transforms</summary>
 | 
				
			||||||
 | 
					    /// Humanoid Control comes with built-in teleport support which can be customized
 | 
				
			||||||
 | 
					    /// using standard Unity solutions. The Teleporter is a specific implementation of an Interaction Pointer.
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Setup
 | 
				
			||||||
 | 
					    /// =====
 | 
				
			||||||
 | 
					    /// Two types of teleportation are supported:
 | 
				
			||||||
 | 
					    /// * Gaze based teleportation
 | 
				
			||||||
 | 
					    /// * Hand pointing based teleportation
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Gaze Teleportation
 | 
				
			||||||
 | 
					    /// ------------------
 | 
				
			||||||
 | 
					    /// You can enable gaze based teleportation on the \ref HeadTarget "Head Target" of the Humanoid.
 | 
				
			||||||
 | 
					    /// Here you will find an ‘Add Teleporter’ button:
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// \image html TeleporterHeadTargetInspector.png
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// When this button is pressed, a Teleporter GameObject (see below) will be attached to the Head Target.
 | 
				
			||||||
 | 
					    /// It will be active by default so that you will see the focus point continuously when running the scene.
 | 
				
			||||||
 | 
					    /// The focus object is a simple sphere, while no line renderer is present.
 | 
				
			||||||
 | 
					    /// Additionally, the Left Button One of the controller will be set to the Click event of the Teleport
 | 
				
			||||||
 | 
					    /// which will teleport the humanoid to the location in focus:
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// \image html TeleporterGazeControllerInput.png
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// The Left Button One will match the Menu Button on the SteamVR Controller and the X button of the Left Oculus Touch Controller.    
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Pointing Teleportation
 | 
				
			||||||
 | 
					    /// ----------------------
 | 
				
			||||||
 | 
					    /// Hand pointing based teleportation is activated on either Hand Target. Like above, you will find an ‘Add Teleporter’ button here:
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// image html TeleporterHandTargetInspector.png
 | 
				
			||||||
 | 
					    ///
 | 
				
			||||||
 | 
					    /// This will add a Teleporter GameObject to the Hand Target. In this case, no focus object is used,
 | 
				
			||||||
 | 
					    /// but an line renderer is used to show the pointing direction. This is visible as a standard pink ray on the hand.
 | 
				
			||||||
 | 
					    /// Pointing teleporting is activated when the ‘One’ button is pressed. While the Click event is matched to the Trigger button.
 | 
				
			||||||
 | 
					    /// The former matches to the Menu Button on the SteamVR controller which the latter is the Trigger on this controller.
 | 
				
			||||||
 | 
					    /// On the Oculus Touch, the One button is the X or A button, while the trigger button is the Index Finger Trigger button.
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// \image html TeleporterPointingControllerInput.png
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Of course you can change these button assignments through the editing of the Controller Input,
 | 
				
			||||||
 | 
					    /// setting the desired button to the Teleporter.Activation and -.Click functions.
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Configuration
 | 
				
			||||||
 | 
					    /// =============
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// \image html TeleporterInspector.png
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// * \ref Teleporter::active "Active"
 | 
				
			||||||
 | 
					    /// * \ref Teleporter::timedClick "Timed teleport"
 | 
				
			||||||
 | 
					    /// * \ref Teleporter::focusPointObject "Target Point Object"
 | 
				
			||||||
 | 
					    /// * \ref Teleporter::rayType "Mode"
 | 
				
			||||||
 | 
					    /// * \ref Teleporter::transportType "Transport Type"
 | 
				
			||||||
 | 
					    ///
 | 
				
			||||||
 | 
					    /// For more information on these parameters, see the \ref "InteractionPointer" Interaction Pointer.
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Target Point Object
 | 
				
			||||||
 | 
					    /// ===================
 | 
				
			||||||
 | 
					    /// The target point object is disabled or enabled automatically when the Teleporter is activates or deactivated.
 | 
				
			||||||
 | 
					    /// The Transform of the target point object will be updated based on the ray curve
 | 
				
			||||||
 | 
					    /// to match the location where the teleport will go.It will be aligned with the Normal of the surface.
 | 
				
			||||||
 | 
					    /// This object can be used to show the target of the teleportation in the way you like.
 | 
				
			||||||
 | 
					    /// 
 | 
				
			||||||
 | 
					    /// Line Renderer
 | 
				
			||||||
 | 
					    /// =============
 | 
				
			||||||
 | 
					    /// When an line renderer is attached to the Target Point Object, it will automatically be updated to 
 | 
				
			||||||
 | 
					    /// show the line ray casting curve. You can change this line render to your likings.
 | 
				
			||||||
 | 
					    /// Only the positions will be overwritten when the teleporter is active.
 | 
				
			||||||
    [HelpURLAttribute("https://passervr.com/documentation/humanoid-control/tools/teleport/")]
 | 
					    [HelpURLAttribute("https://passervr.com/documentation/humanoid-control/tools/teleport/")]
 | 
				
			||||||
    public class Teleporter : InteractionPointer {
 | 
					    public class Teleporter : InteractionPointer {
 | 
				
			||||||
        ///  <summary>Determines how the Transform is moved to the Target Point.</summary>
 | 
					        ///  <summary>Determines how the Transform is moved to the Target Point.</summary>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user