LUADOC - Farming Simulator 22

Script v1_7_1_0

Engine v1_7_1_0

Foundation Reference

raycastAll

Description
Raycast objects, see raycast callback function
Definition
raycastAll(float x, float y, float z, float nx, float ny, float nz, string raycastFunctionCallback, float maxDistance, object targetObject, integer collisionMask, boolean generateNormal, boolean async)
Arguments
floatxx
floatyy
floatzz
floatnxnx
floatnyny
floatnznz
stringraycastFunctionCallbackraycastFunctionCallback (actorId, x,y,z, distance, nx,ny,nz, subShapeIndex, shapeId, isLast)
floatmaxDistancemaxDistance
objecttargetObjecttargetObject (optional)
integercollisionMaskcollisionMask (optional)
booleangenerateNormalgenerateNormal [optional, default=false]
booleanasyncif true, callback will be called in the next frame and calculations will be done in a background thread. In Async mode, the return value has no meaning and if no hit is found, the callback is called once with 0 ids. [optional, default=false]
Return Values
integernumShapesnumShapes if async is false