hitTest
Tests to see if a ray is hitting any nodes within the scene.
Return
HitResult list containing nodes that were hit sorted by distance. Empty if no nodes were hit.
Parameters
motionEvent The motion event where you want the hit ray to happen from.
Tests to see if a ray starting from the screen/camera position is hitting any nodes within the scene and returns a list of HitResult containing all the nodes that were hit, sorted by distance.
Specify the camera/screen/view position where the hit ray will start from in screen coordinates.
Return
HitResult list containing nodes that were hit sorted by distance. Empty if no nodes were hit.
Parameters
x screen coordinate in pixels
y screen coordinate in pixels
Tests to see if a ray starting from the view position is hitting any nodes within the scene and returns a list of HitResult containing all the nodes that were hit, sorted by distance.
Return
HitResult list containing the nodes that were hit sorted by distance. Empty if no nodes were hit.
Parameters
normalized view coordinate x = (0 = left, 0.5 = center, 1 = right) y = (0 = bottom, 0.5 = center, 1 = top)
Tests to see if a ray starting from the view position is hitting any nodes within the scene and returns a list of HitResult containing all the nodes that were hit, sorted by distance.
Return
HitResult list containing the nodes that were hit sorted by distance. Empty if no nodes were hit.
Parameters
The ray to use for the test.