{"action":"opened","issue":{"url":"https://api.github.com/repos/lo-th/Oimo.js/issues/23","labels_url":"https://api.github.com/repos/lo-th/Oimo.js/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/lo-th/Oimo.js/issues/23/comments","events_url":"https://api.github.com/repos/lo-th/Oimo.js/issues/23/events","html_url":"https://github.com/lo-th/Oimo.js/issues/23","id":55694560,"number":23,"title":"Error with world.step() function","user":{"login":"QuaziKb","id":9892122,"avatar_url":"https://avatars.githubusercontent.com/u/9892122?v=3","gravatar_id":"","url":"https://api.github.com/users/QuaziKb","html_url":"https://github.com/QuaziKb","followers_url":"https://api.github.com/users/QuaziKb/followers","following_url":"https://api.github.com/users/QuaziKb/following{/other_user}","gists_url":"https://api.github.com/users/QuaziKb/gists{/gist_id}","starred_url":"https://api.github.com/users/QuaziKb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuaziKb/subscriptions","organizations_url":"https://api.github.com/users/QuaziKb/orgs","repos_url":"https://api.github.com/users/QuaziKb/repos","events_url":"https://api.github.com/users/QuaziKb/events{/privacy}","received_events_url":"https://api.github.com/users/QuaziKb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-28T00:02:17Z","updated_at":"2015-01-28T00:02:17Z","closed_at":null,"body":"Hi! I found a bug with the step() function in the oimo.world prototype.\r\n\r\nBodies which are asleep will not wake up if only their angular velocity has changed, because of what looks like a copying error near the top of the function. the offending chunk looks like this, and is easily fixed.\r\n\r\n          if(tmpB.sleeping){\r\n                var lv=tmpB.linearVelocity;\r\n                var av=tmpB.linearVelocity; <------------------ this should be tmpB.angularVelocity\r\n                var p=tmpB.position;\r\n                var sp=tmpB.sleepPosition;\r\n                var o=tmpB.orientation;\r\n                var so=tmpB.sleepOrientation;\r\n                if(\r\n                lv.x!=0||lv.y!=0||lv.z!=0||\r\n                av.x!=0||av.y!=0||av.z!=0||\r\n                p.x!=sp.x||p.y!=sp.y||p.z!=sp.z||\r\n                o.s!=so.s||o.x!=so.x||o.y!=so.y||o.z!=so.z\r\n                ){\r\n                tmpB.awake();\r\n                continue;\r\n                }\r\n\r\n\r\nI have little experience with GitHub and pull-requests, but I aim to help build on this project, since it seems there are few if any contributors. If someone could help me get started with how to properly fork, get pull requests merged, etc. that'd be great! For starters i'm not sure if i'm supposed to fork the master or gh-pages branch, or if this even matters! I'm a noob with SVN stuff but I have a lot of experience with game engines and rigid body physics (i'm a mechanical engineering student, and have been programming for over a decade). I plan to possibly include support for more body shapes and possibly arbitrary meshes, as well as fix bugs and improve the overall quality of this physics engine, but i'd rather have my additions / fixes merged to the main project than keep them to myself so others could benefit. There really aren't any good js physics engines out there atm which aren't emscripten ports."}}