{"action":"created","issue":{"url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/603","repository_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit","labels_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/603/comments","events_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/603/events","html_url":"https://github.com/thestonefox/SteamVR_Unity_Toolkit/issues/603","id":179981832,"number":603,"title":"Re-implement player presence (Player Body Physics)","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},"labels":[{"url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/labels/I%20need%20to%20look%20at%20this","name":"I need to look at this","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-09-29T08:21:28Z","updated_at":"2016-10-06T15:20:27Z","closed_at":null,"body":"Currently the Player Presence script works by attaching a variable height capsule collider and rigidbody to the player's headset position.\r\n\r\nThis way deals with how to apply gravity to the player (if they fall off something) and preventing them walking into walls and other objects.\r\n\r\nIt has the following issues:\r\n\r\n * Walking into walls within the physical play space pushes the user back causing discomfort.\r\n * Leaning over objects causes push back\r\n * Leaning over drops causes falls even though your feet may still be over what you think is ground\r\n\r\n\r\nArmSwinger uses a collection of ray casts to determine the user's position, however this still suffers from push back on collision (albeit the collisions are not detected by a rigidbody and collider)\r\n\r\nImmersive Movement uses a Character Controller, which is a souped up version of a capsule collider and rigid body.\r\n\r\nI think the Character Controller is probably the best way forward, however with some restrictions such as:\r\n\r\nThe collider does not update position when the player is walking around in their physical play space, but cast a ray down and check for the difference in Y, if Y changes then update the collider position otherwise climbing stairs/slopes wouldn't work.\r\n\r\nIf the X/Z of the play area changes, (e.g. through touchpad walking) then the collider would update position to ensure the player can't slide through walls.\r\n\r\nIf the player walks into a wall (whilst walking in the play area space) then resolve it with another optional script (e.g. headset fade or a new position rewind script).\r\n\r\n\r\nI also think the player presence should be usable without gravity (and replace the drop to nearest floor in height adjust teleport). This would basically use the raycast Y to determine the new floor Y and if gravity is turned off then you instantly appear at that new Y. Also keep a blink threshold setting to fade the headset on fall."},"comment":{"url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/comments/251995588","html_url":"https://github.com/thestonefox/SteamVR_Unity_Toolkit/issues/603#issuecomment-251995588","issue_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/603","id":251995588,"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},"created_at":"2016-10-06T15:20:27Z","updated_at":"2016-10-06T15:20:27Z","body":"Also, we're assuming the only case is leaning forward, what if you're leaning to look around a wall and there is a smaller wall to lean over.\r\n\r\nit's such a bitch of a problem with no way of knowing where your actual waist is :("}}
{"actor":{"display_login":"thestonefox"}}