Playing around with the API, I have this bit of code :
Code
(Don't mind the commented lines.)
And here is getWorldData
Code
terrainId = world:getTerrainData(chunkPos.x, chunkPos.y, chunkPos.z, blockPos.x, blockPos.y, blockPos.z),
(Again, don't mind other pieces of the code, suffices to say that getBlockTypeAndId returns the absolute block id into a type and texture id, etc.)
However, I always get Terrain=0 and Block=block 0. So, is the hit position represented by raycastResult.collisionPoint a position before hitting something, or am I missing something? How do I get the block position where the collision occurs?