What world:raycast gives
world:raycast gives a table with these in it, or nil when the line meets nothing. Keep it in a variable (here it is called hit) and the editor shows these as you type. thing.particleHit and thing.particleTouched give one too, with a particle's speed in it.
hit.thingfunction
hit.thing: thing or nilThe thing the line met. For a particle: the thing it hit (nil at the water's or the path's edge, and when it touched the character).
hit.xfunction
hit.x: numberWhere the line met it, from left to right, in tiles.
hit.yfunction
hit.y: numberWhere the line met it, from top to bottom.
hit.distancefunction
hit.distance: numberHow far along the line that is, in tiles (world:raycast only).
hit.normalXfunction
hit.normalX: numberThe way the side it met faces, across: -1 to the left, 1 to the right, 0 neither. A bullet bounces off along it.
hit.normalYfunction
hit.normalY: numberThe way the side it met faces, up and down: -1 up, 1 down.
hit.velocityXfunction
hit.velocityX: numberA particle's speed across as it hit, in tiles a beat (thing.particleHit and thing.particleTouched only).
hit.velocityYfunction
hit.velocityY: numberA particle's speed up and down as it hit, in tiles a beat: under 0 it went up.
hit.kindfunction
hit.kind: CollisionWhat a particle hit: cat.Collision.water, cat.Collision.path, cat.Collision.blocks or cat.Collision.custom (thing.particleHit only).
One of: water, path, blocks, custom.