myModel.intersect( useBackface, globalOrigin, globalDirection, maxDistance, [ intersection ], [ normal ] ) in Anark Studio 2.5

Does the model intersect the supplied vector?

Arguments

nametypedescription
useBackface Boolean Check for intersection with ba
globalOrigin Vector The vector in global 3D space<
globalDirection Vector Vector specifying the ray dire
maxDistance Number Maximum distance from globalOr
intersection Vector [optional] Returns the positional vector<
normal Vector [optional] Returns a directional vector t
Return Type
Number

Description

Used for collision detection, this function determines whether or not a model has been "hit" by a specified point. This method returns either the distance squared or -1. The distance is defined by the maxDistance argument. If the distance squared is returned, it means the model was hit and the exact hit distance squared is returned. If -1 is returned, it means the model was not hit.