{"action":"created","comment":{"url":"https://api.github.com/repos/thestonefox/VRTK/pulls/comments/84077429","pull_request_review_id":4875964,"id":84077429,"diff_hunk":"@@ -0,0 +1,387 @@\n+﻿// Move In Place|Scripts|0145\n+namespace VRTK\n+{\n+    using UnityEngine;\n+    using System.Collections.Generic;\n+\n+    /// <summary>\n+    /// Move In Place allows you to move the play area by calculating the y-movement of your controllers and propelling you the more they are moving.  This simulates walking in game by walking in real life.\n+    /// </summary>\n+    /// <remarks>\n+    ///   >This locomotion method is based on Immersive Movement, originally created by Highsight.\n+    /// It is recommend you combine this with the VRTK_HeightAdjustTeleport\n+    /// </remarks>\n+    /// <example>\n+    /// `VRTK/Examples/042_CameraRig_MoveInPlace` shows how the user can move and traverse colliders.\n+    /// </example>\n+    [RequireComponent(typeof(VRTK_PlayerPresence))]\n+    public class VRTK_MoveInPlace : MonoBehaviour\n+    {\n+        /// <summary>\n+        /// Options for testing if a play space fall is valid.\n+        /// </summary>\n+        /// <param name=\"HeadsetAndControllers\">Track both headset and controllers for movement calculations.</param>\n+        /// <param name=\"ControllersOnly\">Track only the controllers for movement calculations.</param>\n+        /// <param name=\"HeadsetOnly\">Track only headset for movement caluclations.</param>\n+        public enum ControlOptions\n+        {\n+            HeadsetAndControllers,\n+            ControllersOnly,\n+            HeadsetOnly,\n+        }\n+\n+        /// <summary>\n+        /// Options for which method is used to determine player direction while moving.\n+        /// </summary>\n+        /// <param name=\"Gaze\">Player will always move in the direction they are currently looking.</param>\n+        /// <param name=\"DumbDecoupling\">Player will move in the direction they were first looking when they engaged Move In Place.</param>\n+        /// <param name=\"SmartDecoupling\">Player will move in the direction they are looking only if their headset point the same direction as their controllers.</param>\n+        public enum DirectionalMethod\n+        {\n+            Gaze,\n+            DumbDecoupling,\n+            SmartDecoupling\n+        }\n+\n+        /// <summary>\n+        /// If true, the left controller's trackpad will engage Move In Place.\n+        /// </summary>\n+        public bool LeftController\n+        {\n+            get { return leftController; }\n+            set\n+            {\n+                leftController = value;\n+                SetControllerListeners(controllerLeftHand);\n+            }\n+        }\n+\n+        /// <summary>\n+        /// If true, the right controller's trackpad will engage Move In Place.\n+        /// </summary>\n+        public bool RightController\n+        {\n+            get { return rightController; }\n+            set\n+            {\n+                rightController = value;\n+                SetControllerListeners(controllerRightHand);\n+            }\n+        }\n+\n+        [Tooltip(\"If this is checked then the left controller touchpad will be enabled to move the play area. It can also be toggled at runtime.\")]\n+        [SerializeField]\n+        private bool leftController = true;\n+        [Tooltip(\"If this is checked then the right controller touchpad will be enabled to move the play area. It can also be toggled at runtime.\")]\n+        [SerializeField]\n+        private bool rightController = true;\n+\n+        [Tooltip(\"Select which trackables are used to determine movement.\")]\n+        [SerializeField]\n+        public ControlOptions controlOptions = ControlOptions.HeadsetAndControllers;\n+\n+        [SerializeField]\n+        [Tooltip(\"Lower to decrease speed, raise to increase.\")]\n+        public float speedScale = 1;\n+\n+        [SerializeField]\n+        [Tooltip(\"The max speed you can move in game units. (If 0 or less, max speed is uncapped)\")]\n+        public float maxSpeed = 4;\n+\n+        [SerializeField]\n+        [Tooltip(\"How your 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+        public DirectionalMethod dirMethod = DirectionalMethod.Gaze;\n+\n+        [SerializeField]\n+        [Tooltip(\"If we're using Smart Decoupling, all trackables must be within this degree threshold to change direction.\")]\n+        public float smartDecoupleThreshold = 30f;\n+\n+        // The cap before we stop adding the delta to the movement list.  This will help regulate speed.\n+        [SerializeField]\n+        [Tooltip(\"The max amount of movement we wish to register in the virutal world.  Decreasing this will increase acceleration, and vice versa.\")]\n+        public float sensitivity = 0.02f;\n+\n+        // The maximum number of updates we should hold to process movements.  The higher the number, the slower the acceleration/deceleration & vice versa.\n+        private int averagePeriod = 60;\n+        private float cameraLastYRotation = 0f;\n+        \n+        // Which tracked objects to use to determine amount of movement.\n+        private List<Transform> trackedObjects = new List<Transform>();\n+\n+        private VRTK_PlayerPresence playerBody;","path":"Assets/VRTK/Scripts/VRTK_MoveInPlace.cs","position":111,"original_position":111,"commit_id":"f210fd7c2fc2098682f2a646eb2ecddc5e0efca0","original_commit_id":"f210fd7c2fc2098682f2a646eb2ecddc5e0efca0","user":{"login":"thestonefox","id":1029673,"avatar_url":"https://avatars.githubusercontent.com/u/1029673?v=3","gravatar_id":"","url":"https://api.github.com/users/thestonefox","html_url":"https://github.com/thestonefox","followers_url":"https://api.github.com/users/thestonefox/followers","following_url":"https://api.github.com/users/thestonefox/following{/other_user}","gists_url":"https://api.github.com/users/thestonefox/gists{/gist_id}","starred_url":"https://api.github.com/users/thestonefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thestonefox/subscriptions","organizations_url":"https://api.github.com/users/thestonefox/orgs","repos_url":"https://api.github.com/users/thestonefox/repos","events_url":"https://api.github.com/users/thestonefox/events{/privacy}","received_events_url":"https://api.github.com/users/thestonefox/received_events","type":"User","site_admin":false},"body":"playerBody is never set to anything","created_at":"2016-10-19T14:05:14Z","updated_at":"2016-10-19T14:05:14Z","html_url":"https://github.com/thestonefox/VRTK/pull/664#discussion_r84077429","pull_request_url":"https://api.github.com/repos/thestonefox/VRTK/pulls/664","_links":{"self":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/comments/84077429"},"html":{"href":"https://github.com/thestonefox/VRTK/pull/664#discussion_r84077429"},"pull_request":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/664"}}},"pull_request":{"url":"https://api.github.com/repos/thestonefox/VRTK/pulls/664","id":89560425,"html_url":"https://github.com/thestonefox/VRTK/pull/664","diff_url":"https://github.com/thestonefox/VRTK/pull/664.diff","patch_url":"https://github.com/thestonefox/VRTK/pull/664.patch","issue_url":"https://api.github.com/repos/thestonefox/VRTK/issues/664","number":664,"state":"open","locked":false,"title":"feat(Locomotion): add locomotion based on arm swing / head movement - resolves #602","user":{"login":"Highsight","id":1284005,"avatar_url":"https://avatars.githubusercontent.com/u/1284005?v=3","gravatar_id":"","url":"https://api.github.com/users/Highsight","html_url":"https://github.com/Highsight","followers_url":"https://api.github.com/users/Highsight/followers","following_url":"https://api.github.com/users/Highsight/following{/other_user}","gists_url":"https://api.github.com/users/Highsight/gists{/gist_id}","starred_url":"https://api.github.com/users/Highsight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Highsight/subscriptions","organizations_url":"https://api.github.com/users/Highsight/orgs","repos_url":"https://api.github.com/users/Highsight/repos","events_url":"https://api.github.com/users/Highsight/events{/privacy}","received_events_url":"https://api.github.com/users/Highsight/received_events","type":"User","site_admin":false},"body":"This PR is to add in the Immersive Movement system to the VRTK.  Immersive Movement has been renamed Real Movement to fall more in line with the VRTK brand and to feel more generic and self-explanitory.","created_at":"2016-10-17T04:50:48Z","updated_at":"2016-10-19T14:26:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e391eb9bed26780c1cd4801c669686196c7aeb7f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thestonefox/VRTK/pulls/664/commits","review_comments_url":"https://api.github.com/repos/thestonefox/VRTK/pulls/664/comments","review_comment_url":"https://api.github.com/repos/thestonefox/VRTK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thestonefox/VRTK/issues/664/comments","statuses_url":"https://api.github.com/repos/thestonefox/VRTK/statuses/f210fd7c2fc2098682f2a646eb2ecddc5e0efca0","head":{"label":"Highsight:feat/real-movement","ref":"feat/real-movement","sha":"f210fd7c2fc2098682f2a646eb2ecddc5e0efca0","user":{"login":"Highsight","id":1284005,"avatar_url":"https://avatars.githubusercontent.com/u/1284005?v=3","gravatar_id":"","url":"https://api.github.com/users/Highsight","html_url":"https://github.com/Highsight","followers_url":"https://api.github.com/users/Highsight/followers","following_url":"https://api.github.com/users/Highsight/following{/other_user}","gists_url":"https://api.github.com/users/Highsight/gists{/gist_id}","starred_url":"https://api.github.com/users/Highsight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Highsight/subscriptions","organizations_url":"https://api.github.com/users/Highsight/orgs","repos_url":"https://api.github.com/users/Highsight/repos","events_url":"https://api.github.com/users/Highsight/events{/privacy}","received_events_url":"https://api.github.com/users/Highsight/received_events","type":"User","site_admin":false},"repo":{"id":71100403,"name":"VRTK","full_name":"Highsight/VRTK","owner":{"login":"Highsight","id":1284005,"avatar_url":"https://avatars.githubusercontent.com/u/1284005?v=3","gravatar_id":"","url":"https://api.github.com/users/Highsight","html_url":"https://github.com/Highsight","followers_url":"https://api.github.com/users/Highsight/followers","following_url":"https://api.github.com/users/Highsight/following{/other_user}","gists_url":"https://api.github.com/users/Highsight/gists{/gist_id}","starred_url":"https://api.github.com/users/Highsight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Highsight/subscriptions","organizations_url":"https://api.github.com/users/Highsight/orgs","repos_url":"https://api.github.com/users/Highsight/repos","events_url":"https://api.github.com/users/Highsight/events{/privacy}","received_events_url":"https://api.github.com/users/Highsight/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Highsight/VRTK","description":"A collection of useful scripts and prefabs for building VR titles in Unity 5","fork":true,"url":"https://api.github.com/repos/Highsight/VRTK","forks_url":"https://api.github.com/repos/Highsight/VRTK/forks","keys_url":"https://api.github.com/repos/Highsight/VRTK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Highsight/VRTK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Highsight/VRTK/teams","hooks_url":"https://api.github.com/repos/Highsight/VRTK/hooks","issue_events_url":"https://api.github.com/repos/Highsight/VRTK/issues/events{/number}","events_url":"https://api.github.com/repos/Highsight/VRTK/events","assignees_url":"https://api.github.com/repos/Highsight/VRTK/assignees{/user}","branches_url":"https://api.github.com/repos/Highsight/VRTK/branches{/branch}","tags_url":"https://api.github.com/repos/Highsight/VRTK/tags","blobs_url":"https://api.github.com/repos/Highsight/VRTK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Highsight/VRTK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Highsight/VRTK/git/refs{/sha}","trees_url":"https://api.github.com/repos/Highsight/VRTK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Highsight/VRTK/statuses/{sha}","languages_url":"https://api.github.com/repos/Highsight/VRTK/languages","stargazers_url":"https://api.github.com/repos/Highsight/VRTK/stargazers","contributors_url":"https://api.github.com/repos/Highsight/VRTK/contributors","subscribers_url":"https://api.github.com/repos/Highsight/VRTK/subscribers","subscription_url":"https://api.github.com/repos/Highsight/VRTK/subscription","commits_url":"https://api.github.com/repos/Highsight/VRTK/commits{/sha}","git_commits_url":"https://api.github.com/repos/Highsight/VRTK/git/commits{/sha}","comments_url":"https://api.github.com/repos/Highsight/VRTK/comments{/number}","issue_comment_url":"https://api.github.com/repos/Highsight/VRTK/issues/comments{/number}","contents_url":"https://api.github.com/repos/Highsight/VRTK/contents/{+path}","compare_url":"https://api.github.com/repos/Highsight/VRTK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Highsight/VRTK/merges","archive_url":"https://api.github.com/repos/Highsight/VRTK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Highsight/VRTK/downloads","issues_url":"https://api.github.com/repos/Highsight/VRTK/issues{/number}","pulls_url":"https://api.github.com/repos/Highsight/VRTK/pulls{/number}","milestones_url":"https://api.github.com/repos/Highsight/VRTK/milestones{/number}","notifications_url":"https://api.github.com/repos/Highsight/VRTK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Highsight/VRTK/labels{/name}","releases_url":"https://api.github.com/repos/Highsight/VRTK/releases{/id}","deployments_url":"https://api.github.com/repos/Highsight/VRTK/deployments","created_at":"2016-10-17T04:37:49Z","updated_at":"2016-10-17T04:37:53Z","pushed_at":"2016-10-19T13:03:14Z","git_url":"git://github.com/Highsight/VRTK.git","ssh_url":"git@github.com:Highsight/VRTK.git","clone_url":"https://github.com/Highsight/VRTK.git","svn_url":"https://github.com/Highsight/VRTK","homepage":"http://vrtk.io","size":74381,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thestonefox:master","ref":"master","sha":"0644f80992c7ef5b1bef7123d413b67939dd46f8","user":{"login":"thestonefox","id":1029673,"avatar_url":"https://avatars.githubusercontent.com/u/1029673?v=3","gravatar_id":"","url":"https://api.github.com/users/thestonefox","html_url":"https://github.com/thestonefox","followers_url":"https://api.github.com/users/thestonefox/followers","following_url":"https://api.github.com/users/thestonefox/following{/other_user}","gists_url":"https://api.github.com/users/thestonefox/gists{/gist_id}","starred_url":"https://api.github.com/users/thestonefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thestonefox/subscriptions","organizations_url":"https://api.github.com/users/thestonefox/orgs","repos_url":"https://api.github.com/users/thestonefox/repos","events_url":"https://api.github.com/users/thestonefox/events{/privacy}","received_events_url":"https://api.github.com/users/thestonefox/received_events","type":"User","site_admin":false},"repo":{"id":56940351,"name":"VRTK","full_name":"thestonefox/VRTK","owner":{"login":"thestonefox","id":1029673,"avatar_url":"https://avatars.githubusercontent.com/u/1029673?v=3","gravatar_id":"","url":"https://api.github.com/users/thestonefox","html_url":"https://github.com/thestonefox","followers_url":"https://api.github.com/users/thestonefox/followers","following_url":"https://api.github.com/users/thestonefox/following{/other_user}","gists_url":"https://api.github.com/users/thestonefox/gists{/gist_id}","starred_url":"https://api.github.com/users/thestonefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thestonefox/subscriptions","organizations_url":"https://api.github.com/users/thestonefox/orgs","repos_url":"https://api.github.com/users/thestonefox/repos","events_url":"https://api.github.com/users/thestonefox/events{/privacy}","received_events_url":"https://api.github.com/users/thestonefox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thestonefox/VRTK","description":"A collection of useful scripts and prefabs for building VR titles in Unity 5","fork":false,"url":"https://api.github.com/repos/thestonefox/VRTK","forks_url":"https://api.github.com/repos/thestonefox/VRTK/forks","keys_url":"https://api.github.com/repos/thestonefox/VRTK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thestonefox/VRTK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thestonefox/VRTK/teams","hooks_url":"https://api.github.com/repos/thestonefox/VRTK/hooks","issue_events_url":"https://api.github.com/repos/thestonefox/VRTK/issues/events{/number}","events_url":"https://api.github.com/repos/thestonefox/VRTK/events","assignees_url":"https://api.github.com/repos/thestonefox/VRTK/assignees{/user}","branches_url":"https://api.github.com/repos/thestonefox/VRTK/branches{/branch}","tags_url":"https://api.github.com/repos/thestonefox/VRTK/tags","blobs_url":"https://api.github.com/repos/thestonefox/VRTK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thestonefox/VRTK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thestonefox/VRTK/git/refs{/sha}","trees_url":"https://api.github.com/repos/thestonefox/VRTK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thestonefox/VRTK/statuses/{sha}","languages_url":"https://api.github.com/repos/thestonefox/VRTK/languages","stargazers_url":"https://api.github.com/repos/thestonefox/VRTK/stargazers","contributors_url":"https://api.github.com/repos/thestonefox/VRTK/contributors","subscribers_url":"https://api.github.com/repos/thestonefox/VRTK/subscribers","subscription_url":"https://api.github.com/repos/thestonefox/VRTK/subscription","commits_url":"https://api.github.com/repos/thestonefox/VRTK/commits{/sha}","git_commits_url":"https://api.github.com/repos/thestonefox/VRTK/git/commits{/sha}","comments_url":"https://api.github.com/repos/thestonefox/VRTK/comments{/number}","issue_comment_url":"https://api.github.com/repos/thestonefox/VRTK/issues/comments{/number}","contents_url":"https://api.github.com/repos/thestonefox/VRTK/contents/{+path}","compare_url":"https://api.github.com/repos/thestonefox/VRTK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thestonefox/VRTK/merges","archive_url":"https://api.github.com/repos/thestonefox/VRTK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thestonefox/VRTK/downloads","issues_url":"https://api.github.com/repos/thestonefox/VRTK/issues{/number}","pulls_url":"https://api.github.com/repos/thestonefox/VRTK/pulls{/number}","milestones_url":"https://api.github.com/repos/thestonefox/VRTK/milestones{/number}","notifications_url":"https://api.github.com/repos/thestonefox/VRTK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thestonefox/VRTK/labels{/name}","releases_url":"https://api.github.com/repos/thestonefox/VRTK/releases{/id}","deployments_url":"https://api.github.com/repos/thestonefox/VRTK/deployments","created_at":"2016-04-23T20:55:19Z","updated_at":"2016-10-19T08:18:00Z","pushed_at":"2016-10-19T13:03:15Z","git_url":"git://github.com/thestonefox/VRTK.git","ssh_url":"git@github.com:thestonefox/VRTK.git","clone_url":"https://github.com/thestonefox/VRTK.git","svn_url":"https://github.com/thestonefox/VRTK","homepage":"http://vrtk.io","size":79170,"stargazers_count":848,"watchers_count":848,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":70,"forks":209,"open_issues":70,"watchers":848,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/664"},"html":{"href":"https://github.com/thestonefox/VRTK/pull/664"},"issue":{"href":"https://api.github.com/repos/thestonefox/VRTK/issues/664"},"comments":{"href":"https://api.github.com/repos/thestonefox/VRTK/issues/664/comments"},"review_comments":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/664/comments"},"review_comment":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thestonefox/VRTK/pulls/664/commits"},"statuses":{"href":"https://api.github.com/repos/thestonefox/VRTK/statuses/f210fd7c2fc2098682f2a646eb2ecddc5e0efca0"}}}}
{"actor":{"display_login":"thestonefox"}}