Doc > Nodes > EVENT > Raycast

Doc > Nodes > EVENT > Raycast

Allows to detect when the mouse hovers over an object

Description

no description

Parameters

Name Type Description
mode integer defines if the ray detection is done on the CPU or GPU (GPU being currently experimental)
mouse vector2 mouse coordinates (0,0) being the center of the screen, (-1,-1) being the bottom left corner and (1,1) being the top right corner
overrideCamera boolean by default the ray is sent from the current camera, but this allows to set another camera
overrideRay boolean by default the ray is sent from the current camera, but this allows to set a custom ray
camera operator_path the camera to override to
rayOrigin vector3 the ray origin
rayDirection vector3 the ray direction
material operator_path the material to use on the scene for GPU detection
pixelValue vector4 the current pixel value being read
hitThreshold float the value threshold for which a hit is detected
intersectWith integer defines the hit it tested against geometry or just a plane
pointsThreshold float threshold used to test hit with points
planeDirection vector3 plane direction if the hit is tested against a plane
planeOffset float plane offset if the hit is tested against a plane
targetNode node_path node whose objects to test hit against, when testing against geometries
objectMask string objects to test hit against, when testing against geometries
printFoundObjectsFromMask button prints which objects are targeted by this node, for debugging
traverseChildren boolean toggle to hit if tested against children
tpositionTarget boolean toggle on to set the param to the hit position
position vector3 this will be set to the hit position
positionTarget param_path this parameter will be set to the hit position
tvelocity boolean toggle on to set the param to the mouse velocity (experimental)
tvelocityTarget boolean toggle on to set the param to the mouse velocity
velocity vector3 this will be set to the mouse velocity
velocityTarget param_path this will be set to the mouse velocity
geoAttribute boolean for geometry hit tests, a vertex attribute can be read
geoAttributeName string geometry vertex attribute to read
geoAttributeType integer type of attribute
geoAttributeValue1 float attribute value for float
geoAttributeValues string attribute value for string