9.5.2

Table Of Contents
1100 CHAPTER 22
XPRESSO EDITOR 1101
Ray Collision
The ray has been created between points P1 and P2. The expression places the sphere at the point
where the ray hits the cube.
This node generates a ray and checks if and where it hits a polygon object. If you want the ray to
collide with primitive a object or a NURBS object, you must convert the object to polygons before
using it with this node.
The following input ports are available:
Object: Here, connect the polygon object that you want to re the ray at.
Ray Point1, Ray Point2: The ray is dened by two points. The vector between
these two points represents the ray. Ray Point1 denes the starting position
of the ray, Ray Point2 its end position. These two points enable you to dene
not only the direction of the ray, but its length also.
The following options are available in the Attribute manager:
Test Only: Enable this option if the only output port you are using is Collision.
This will speed up the calculation of the node, because the other output ports
will no longer be calculated.
Global Coordinates: If this option is enabled, the output will be given in
global coordinates.
The following output ports are available:
Collision: This port signals whether the ray has hit the object. A Bool value of
1 indicates a collision, a Bool value of 0 means the ray missed the object.