{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/7331","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/7331/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/7331/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/7331/events","html_url":"https://github.com/minetest/minetest/pull/7331","id":322624439,"number":7331,"title":"Added pitch and roll for entities, saving rotations should also work","user":{"login":"CoderForTheBetter","id":28787282,"avatar_url":"https://avatars2.githubusercontent.com/u/28787282?v=4","gravatar_id":"","url":"https://api.github.com/users/CoderForTheBetter","html_url":"https://github.com/CoderForTheBetter","followers_url":"https://api.github.com/users/CoderForTheBetter/followers","following_url":"https://api.github.com/users/CoderForTheBetter/following{/other_user}","gists_url":"https://api.github.com/users/CoderForTheBetter/gists{/gist_id}","starred_url":"https://api.github.com/users/CoderForTheBetter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoderForTheBetter/subscriptions","organizations_url":"https://api.github.com/users/CoderForTheBetter/orgs","repos_url":"https://api.github.com/users/CoderForTheBetter/repos","events_url":"https://api.github.com/users/CoderForTheBetter/events{/privacy}","received_events_url":"https://api.github.com/users/CoderForTheBetter/received_events","type":"User","site_admin":false},"labels":[{"id":73368983,"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Script%20API","name":"@ Script API","color":"0e8a16","default":false},{"id":471238548,"url":"https://api.github.com/repos/minetest/minetest/labels/Feature","name":"Feature","color":"0052cc","default":false},{"id":336502596,"url":"https://api.github.com/repos/minetest/minetest/labels/One%20approval","name":"One approval","color":"BEE4D6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-05-13T20:25:16Z","updated_at":"2018-05-28T02:26:18Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/7331","html_url":"https://github.com/minetest/minetest/pull/7331","diff_url":"https://github.com/minetest/minetest/pull/7331.diff","patch_url":"https://github.com/minetest/minetest/pull/7331.patch"},"body":"This should add pitch and roll for entities.\r\n\r\nSee these related items around Github:\r\n[My issue (closed) (#7323)](https://github.com/minetest/minetest/issues/7323)\r\n[Another issue requesting pitch and roll (#2251)](https://github.com/minetest/minetest/issues/2251)\r\n\r\nHere's this pull request in action:\r\n![39964985-52756f48-565e-11e8-89e8-256ab236f611](https://user-images.githubusercontent.com/28787282/39971521-902a7d3a-56ca-11e8-806d-02952471b351.gif)\r\nHere's the Lua code that rotates the helicopter in the above gif.\r\n```\r\nfunction Helicopter:on_step(_, dtime)\r\n  \r\n  if timer > -1 and timer < 90 then\r\n    y=y+0.1\r\n    p=0\r\n    r=0\r\n    minetest.chat_send_all(\"YAW: \" .. tostring(y))\r\n  elseif timer > 90 and timer < 180 then\r\n    y=0\r\n    p=p+0.1\r\n    r=0\r\n    minetest.chat_send_all(\"PITCH: \" .. tostring(p))\r\n  elseif timer > 180 and timer < 270 then\r\n    y=0\r\n    p=0\r\n    r=r+0.1\r\n    minetest.chat_send_all(\"ROLL: \" .. tostring(r))\r\n  end\r\n  \r\n  self.object:set_yaw(y)\r\n  self.object:set_pitch(p)\r\n  self.object:set_roll(r)\r\n\r\n  timer = timer + 1\r\n  if timer > 270 then\r\n    timer = 0\r\n  end\r\nend\r\n```\r\n\r\nOne thing I'm concerned with and didn't know how to handle (style issue) is the overriding of get/set pitch of the player's view and the methods I made. This can be found in the content_sao.h file. Also, I'm not sure if I should add the ability to automatically rotate entities on the pitch and roll axes like we have for yaw (automatic_rotate in Lua entity definition).\r\n\r\nIf these changes are good then I will add documentation to the Lua API in this pull request or another.\r\n\r\nPlease mark this WIP since it is still being tested and added to, thank you."},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/392402694","html_url":"https://github.com/minetest/minetest/pull/7331#issuecomment-392402694","issue_url":"https://api.github.com/repos/minetest/minetest/issues/7331","id":392402694,"user":{"login":"paramat","id":3686677,"avatar_url":"https://avatars0.githubusercontent.com/u/3686677?v=4","gravatar_id":"","url":"https://api.github.com/users/paramat","html_url":"https://github.com/paramat","followers_url":"https://api.github.com/users/paramat/followers","following_url":"https://api.github.com/users/paramat/following{/other_user}","gists_url":"https://api.github.com/users/paramat/gists{/gist_id}","starred_url":"https://api.github.com/users/paramat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paramat/subscriptions","organizations_url":"https://api.github.com/users/paramat/orgs","repos_url":"https://api.github.com/users/paramat/repos","events_url":"https://api.github.com/users/paramat/events{/privacy}","received_events_url":"https://api.github.com/users/paramat/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T02:26:18Z","updated_at":"2018-05-28T02:26:18Z","author_association":"MEMBER","body":"Looking at that animation, pitch looks correct, then roll seems to be around a world axis instead of the green model axis, then yaw is very strange."}}
{"actor":{"display_login":"paramat"}}