LUADOC - Farming Simulator 17

Printable Version

raycastFunctionName

Description
This function is called when a raycast hit event occurs.
See raycastAll and raycastClosest
Definition
raycastFunctionName(integer hitObjectId, float x, float y, float z, float distance, float nx, float ny, float nz, integer subShapeIndex)
Arguments
integerhitObjectIdid of the hit node
floatxworld impact x
floatyworld impact y
floatzworld impact z
floatdistancedistance
floatnxworld normal x (only valid if generatenormal was true)
floatnyworld normal y (only valid if generatenormal was true)
floatnzworld normal nz (only valid if generatenormal was true)
integersubShapeIndexsub shape index of destructible object. negative if normal rigid body (check for subshapeindex >= 0)
Return Values
booleancontinuecontinue raycasting