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) |
tmouse | boolean | defines if the mouse parameter is update when the cursor screen position changes |
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 |
material | node_path | the material to use on the scene for GPU detection |
pixelColor | color | the current pixel color 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 |
tposition | boolean | toggle on to update hit position |
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 |