{"action":"created","issue":{"url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/30","labels_url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/30/comments","events_url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/30/events","html_url":"https://github.com/cjddmut/Unity-2D-Platformer-Controller/pull/30","id":99853168,"number":30,"title":"Ladders (FreeMode state)","user":{"login":"llafuente","id":752124,"avatar_url":"https://avatars.githubusercontent.com/u/752124?v=3","gravatar_id":"","url":"https://api.github.com/users/llafuente","html_url":"https://github.com/llafuente","followers_url":"https://api.github.com/users/llafuente/followers","following_url":"https://api.github.com/users/llafuente/following{/other_user}","gists_url":"https://api.github.com/users/llafuente/gists{/gist_id}","starred_url":"https://api.github.com/users/llafuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llafuente/subscriptions","organizations_url":"https://api.github.com/users/llafuente/orgs","repos_url":"https://api.github.com/users/llafuente/repos","events_url":"https://api.github.com/users/llafuente/events{/privacy}","received_events_url":"https://api.github.com/users/llafuente/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-09T02:02:29Z","updated_at":"2015-09-04T16:01:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/pulls/30","html_url":"https://github.com/cjddmut/Unity-2D-Platformer-Controller/pull/30","diff_url":"https://github.com/cjddmut/Unity-2D-Platformer-Controller/pull/30.diff","patch_url":"https://github.com/cjddmut/Unity-2D-Platformer-Controller/pull/30.patch"},"body":"To implement ladders I use an \"update yourself\" state called: freeMode.\r\n\r\nnotes:\r\n* `_motor.FreeModeEnter(String);` will stop any motor movement. And now you update the velocity by hand. (do not update normalizedXMovement, just velocity)\r\n* `_motor.FreeModeExit();` set state to `Falling`.\r\n* If you are in freeMode and touch the ground, you are in the `OnGround`.\r\n\r\nI create a demo, to climb a ladder you must has up/down pressed inside the ladder.\r\n\r\n\r\nI need feedback on this. I feel the API can be improved, I will try to demo ropes asap.\r\n\r\nTODO\r\n- [ ] animation\r\n- [x] When ladder ends, player jumps a little and start falling, a One Way Platform at the top, should do the trick. While freeMode, OWP should not collide with the motor\r\n- [x] Players can always leave the ladder by each side without jumping... Create a restricted area that the motor cannot leave.\r\n- [ ] Handle rotated restricted areas\r\n- [x] fix? jump at the top of the ladder\r\n- [x] Disable Wall stick the OWP side?\r\n- [x] remove Debug.Log / whitespaces cleanup\r\n- [x] Static horizontal / vertical \"rope/fence\" example\r\n\r\nSorry for messing whitespaces, I will clean up the PR later."},"comment":{"url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/comments/137777323","html_url":"https://github.com/cjddmut/Unity-2D-Platformer-Controller/pull/30#issuecomment-137777323","issue_url":"https://api.github.com/repos/cjddmut/Unity-2D-Platformer-Controller/issues/30","id":137777323,"user":{"login":"llafuente","id":752124,"avatar_url":"https://avatars.githubusercontent.com/u/752124?v=3","gravatar_id":"","url":"https://api.github.com/users/llafuente","html_url":"https://github.com/llafuente","followers_url":"https://api.github.com/users/llafuente/followers","following_url":"https://api.github.com/users/llafuente/following{/other_user}","gists_url":"https://api.github.com/users/llafuente/gists{/gist_id}","starred_url":"https://api.github.com/users/llafuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llafuente/subscriptions","organizations_url":"https://api.github.com/users/llafuente/orgs","repos_url":"https://api.github.com/users/llafuente/repos","events_url":"https://api.github.com/users/llafuente/events{/privacy}","received_events_url":"https://api.github.com/users/llafuente/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T16:01:49Z","updated_at":"2015-09-04T16:01:49Z","body":"I added support for ladders with two OWP and the floor (three floors)\r\n\r\nAnimation still missing...\r\n@cjddmut I guess the ninja is free art, i cant find it, do you have more sprites? I really don't want to edit the images myself..."}}