aboutsummaryrefslogtreecommitdiff
path: root/src/raycast.h
AgeCommit message (Collapse)Author
2022-10-30Allow rotating entity selectionboxes (#12379)Lars Müller
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-07-07Expose getPointedThing to LuaDániel Juhász
This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).