{"__v":0,"_id":"58796781cd4a9c37007c9708","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:41:26.797Z","from_sync":false,"order":4,"slug":"locomotion","title":"Locomotion"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"__v":4,"_id":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","createdAt":"2017-01-13T23:49:21.393Z","releaseDate":"2017-01-13T23:49:21.393Z","categories":["58796781cd4a9c37007c96f0","58796781cd4a9c37007c96f1","58796781cd4a9c37007c96f2","58796781cd4a9c37007c96f3","58796781cd4a9c37007c96f4","58796781cd4a9c37007c96f5","58796781cd4a9c37007c96f6","58796781cd4a9c37007c96f7","58796781cd4a9c37007c96f8","58796781cd4a9c37007c96f9","58796781cd4a9c37007c96fa","58796781cd4a9c37007c96fb","58796781cd4a9c37007c96fc","58796781cd4a9c37007c96fd","58796781cd4a9c37007c96fe","58796781cd4a9c37007c96ff","58796781cd4a9c37007c9700","58b157ca1756cf370022f90d","58b1596f5dae732f00adeca2","58b1605a5dae732f00adecb1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mukota","version_clean":"3.1.0","version":"3.1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T16:44:51.993Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":9,"body":"## Overview\n\nMove In Place allows the user to move the play area by calculating the y-movement of the user's headset and/or controllers. The user is propelled forward the more they are moving. This simulates moving in game by moving in real life.\n\n> This locomotion method is based on Immersive Movement, originally created by Highsight.\n\n## Inspector Parameters\n\n * **Left Controller:** If this is checked then the left controller touchpad will be enabled to move the play area.\n * **Right Controller:** If this is checked then the right controller touchpad will be enabled to move the play area.\n * **Engage Button:** Select which button to hold to engage Move In Place.\n * **Control Options:** Select which trackables are used to determine movement.\n * **Speed Scale:** Lower to decrease speed, raise to increase.\n * **Max Speed:** The max speed the user can move in game units. (If 0 or less, max speed is uncapped)\n * **Deceleration:** The speed in which the play area slows down to a complete stop when the user is no longer pressing the engage button. This deceleration effect can ease any motion sickness that may be suffered.\n * **Falling Deceleration:** The speed in which the play area slows down to a complete stop when the user is falling.\n * **Direction Method:** How the user's movement direction will be determined.  The Gaze method tends to lead to the least motion sickness.  Smart decoupling is still a Work In Progress.\n * **Smart Decouple Threshold:** The degree threshold that all tracked objects (controllers, headset) must be within to change direction when using the Smart Decoupling Direction Method.\n * **Sensitivity:** The maximum amount of movement required to register in the virtual world.  Decreasing this will increase acceleration, and vice versa.\n\n## Class Variables\n\n * `public enum ControlOptions` - Options for testing if a play space fall is valid.\n  * `HeadsetAndControllers` - Track both headset and controllers for movement calculations.\n  * `ControllersOnly` - Track only the controllers for movement calculations.\n  * `HeadsetOnly` - Track only headset for movement caluclations.\n * `public enum DirectionalMethod` - Options for which method is used to determine player direction while moving.\n  * `Gaze` - Player will always move in the direction they are currently looking.\n  * `ControllerRotation` - Player will move in the direction that the controllers are pointing (averaged).\n  * `DumbDecoupling` - Player will move in the direction they were first looking when they engaged Move In Place.\n  * `SmartDecoupling` - Player will move in the direction they are looking only if their headset point the same direction as their controllers.\n\n## Class Methods\n\n### SetControlOptions/1\n\n  > `public void SetControlOptions(ControlOptions givenControlOptions)`\n\n  * Parameters\n   * `ControlOptions givenControlOptions` - The control options to set the current control options to.\n  * Returns\n   * _none_\n\nSet the control options and modify the trackables to match.\n\n### GetMovementDirection/0\n\n  > `public Vector3 GetMovementDirection()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `Vector3` - Returns a vector representing the player's current movement direction.\n\nThe GetMovementDirection method will return the direction the player is moving.\n\n### GetSpeed/0\n\n  > `public float GetSpeed()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `float` - Returns a float representing the player's current movement speed.\n\nThe GetSpeed method will return the current speed the player is moving at.\n\n## Example\n\n`VRTK/Examples/042_CameraRig_MoveInPlace` demonstrates how the user can move and traverse colliders by either swinging the controllers in a walking fashion or by running on the spot utilisng the head bob for movement.","excerpt":"","slug":"vrtk_moveinplace","type":"basic","title":"VRTK_MoveInPlace"}
## Overview Move In Place allows the user to move the play area by calculating the y-movement of the user's headset and/or controllers. The user is propelled forward the more they are moving. This simulates moving in game by moving in real life. > This locomotion method is based on Immersive Movement, originally created by Highsight. ## Inspector Parameters * **Left Controller:** If this is checked then the left controller touchpad will be enabled to move the play area. * **Right Controller:** If this is checked then the right controller touchpad will be enabled to move the play area. * **Engage Button:** Select which button to hold to engage Move In Place. * **Control Options:** Select which trackables are used to determine movement. * **Speed Scale:** Lower to decrease speed, raise to increase. * **Max Speed:** The max speed the user can move in game units. (If 0 or less, max speed is uncapped) * **Deceleration:** The speed in which the play area slows down to a complete stop when the user is no longer pressing the engage button. This deceleration effect can ease any motion sickness that may be suffered. * **Falling Deceleration:** The speed in which the play area slows down to a complete stop when the user is falling. * **Direction Method:** How the user's movement direction will be determined. The Gaze method tends to lead to the least motion sickness. Smart decoupling is still a Work In Progress. * **Smart Decouple Threshold:** The degree threshold that all tracked objects (controllers, headset) must be within to change direction when using the Smart Decoupling Direction Method. * **Sensitivity:** The maximum amount of movement required to register in the virtual world. Decreasing this will increase acceleration, and vice versa. ## Class Variables * `public enum ControlOptions` - Options for testing if a play space fall is valid. * `HeadsetAndControllers` - Track both headset and controllers for movement calculations. * `ControllersOnly` - Track only the controllers for movement calculations. * `HeadsetOnly` - Track only headset for movement caluclations. * `public enum DirectionalMethod` - Options for which method is used to determine player direction while moving. * `Gaze` - Player will always move in the direction they are currently looking. * `ControllerRotation` - Player will move in the direction that the controllers are pointing (averaged). * `DumbDecoupling` - Player will move in the direction they were first looking when they engaged Move In Place. * `SmartDecoupling` - Player will move in the direction they are looking only if their headset point the same direction as their controllers. ## Class Methods ### SetControlOptions/1 > `public void SetControlOptions(ControlOptions givenControlOptions)` * Parameters * `ControlOptions givenControlOptions` - The control options to set the current control options to. * Returns * _none_ Set the control options and modify the trackables to match. ### GetMovementDirection/0 > `public Vector3 GetMovementDirection()` * Parameters * _none_ * Returns * `Vector3` - Returns a vector representing the player's current movement direction. The GetMovementDirection method will return the direction the player is moving. ### GetSpeed/0 > `public float GetSpeed()` * Parameters * _none_ * Returns * `float` - Returns a float representing the player's current movement speed. The GetSpeed method will return the current speed the player is moving at. ## Example `VRTK/Examples/042_CameraRig_MoveInPlace` demonstrates how the user can move and traverse colliders by either swinging the controllers in a walking fashion or by running on the spot utilisng the head bob for movement.