{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/7907","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/7907/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/7907/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/7907/events","html_url":"https://github.com/minetest/minetest/issues/7907","id":385085378,"node_id":"MDU6SXNzdWUzODUwODUzNzg=","number":7907,"title":"Exact location of `pointed_thing`","user":{"login":"Extex101","id":33675971,"node_id":"MDQ6VXNlcjMzNjc1OTcx","avatar_url":"https://avatars0.githubusercontent.com/u/33675971?v=4","gravatar_id":"","url":"https://api.github.com/users/Extex101","html_url":"https://github.com/Extex101","followers_url":"https://api.github.com/users/Extex101/followers","following_url":"https://api.github.com/users/Extex101/following{/other_user}","gists_url":"https://api.github.com/users/Extex101/gists{/gist_id}","starred_url":"https://api.github.com/users/Extex101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Extex101/subscriptions","organizations_url":"https://api.github.com/users/Extex101/orgs","repos_url":"https://api.github.com/users/Extex101/repos","events_url":"https://api.github.com/users/Extex101/events{/privacy}","received_events_url":"https://api.github.com/users/Extex101/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-28T03:27:56Z","updated_at":"2018-12-01T13:57:17Z","closed_at":"2018-11-28T18:29:52Z","author_association":"NONE","body":"##### Issue type\r\n<!-- Pick one below and delete others --> - Feature request\r\n \r\n##### Minetest version\r\n<!--\r\nPaste Minetest version between quotes below\r\nIf you are on a devel version, please add git commit hash\r\nYou can use `minetest --version` to find it.\r\n-->\r\n```\r\n0.5.0-b6adb7f\r\n```\r\n\r\n##### Summary\r\n<!-- Describe your problem here -->\r\nI need to place an entity at the exact pointed location\r\nmaybe have a pointed_thing.exact_pos\r\n\r\n##### Steps to reproduce\r\n<!-- For bug reports or build issues, explain how the problem happened -->\r\nMake a mod with this code:\r\n```\r\nminetest.register_entity(\"mymod:entity\", {\r\nvisual = \"cube\",\r\n\ttextures = {\r\n\t\t\"default_dirt.png\",\r\n\t\t\"default_dirt.png\",\r\n\t\t\"default_dirt.png\",\r\n\t\t\"default_dirt.png\",\r\n\t\t\"default_dirt.png\",\r\n\t\t\"default_dirt.png\",\r\n\t},\r\n\tvisual_size = {x=0.3, y=0.3, z=0.3},\r\n\tcollisionbox = {-0.14, -0.14, -0.14, 0.14, 0.14, 0.14},\r\n})\r\nminetest.register_craftitem(\"mymod:item\", {\r\n\tdescription = \"Entity placer\",\r\n\tinventory_image = \"default_stick.png\",\r\n\ton_place = function(pointed_thing, itemstack)\r\n               local pos = pointed_thing.above\r\n               minetest.add_entity(pos, \"mymod:entity\")\r\n               return itemstack\r\n        end,\r\n})\r\n```\r\nSo instead of placing at the exact position it is placed at centre of above node"},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/443428133","html_url":"https://github.com/minetest/minetest/issues/7907#issuecomment-443428133","issue_url":"https://api.github.com/repos/minetest/minetest/issues/7907","id":443428133,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQyODEzMw==","user":{"login":"DS-Minetest","id":7613443,"node_id":"MDQ6VXNlcjc2MTM0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7613443?v=4","gravatar_id":"","url":"https://api.github.com/users/DS-Minetest","html_url":"https://github.com/DS-Minetest","followers_url":"https://api.github.com/users/DS-Minetest/followers","following_url":"https://api.github.com/users/DS-Minetest/following{/other_user}","gists_url":"https://api.github.com/users/DS-Minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/DS-Minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DS-Minetest/subscriptions","organizations_url":"https://api.github.com/users/DS-Minetest/orgs","repos_url":"https://api.github.com/users/DS-Minetest/repos","events_url":"https://api.github.com/users/DS-Minetest/events{/privacy}","received_events_url":"https://api.github.com/users/DS-Minetest/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T13:57:17Z","updated_at":"2018-12-01T13:57:17Z","author_association":"CONTRIBUTOR","body":"> Dig and place actions do not supply enough information to simply calculate the exact pointed location. Use `Raycast` for further precision.\r\n\r\nIf you've got a `pointed_thing` with `type=\"node\"` and a player object, you have got enough information to calculate the exact pointed location with nearly the same precision as `Raycast`.\r\nFor normal node-sized cube nodes this is already implemented in minetest:\r\nhttps://github.com/minetest/minetest/blob/327bad2eafb8cfc05b7f831992be5700a167a53c/doc/lua_api.txt#L2442-L2444\r\n[But it's also possible for all types of nodes.](https://github.com/DS-Minetest/minetest/blob/fec435d18cb0544f2a0fd38fc8db8b242f2eed0d/builtin/common/misc_helpers.lua#L772-L825)"}}
{"actor":{"display_login":"DS-Minetest"}}