Created the page for the Racaster node. |
Changed the note from information to suggestion. |
||
Line 28: | Line 28: | ||
This node can be combined with the [[ProtoFlux:Hit UV Coordinate|Hit UV Coordinate]] node to get further data from this hit, such as a 2D location point on the collider for example. | This node can be combined with the [[ProtoFlux:Hit UV Coordinate|Hit UV Coordinate]] node to get further data from this hit, such as a 2D location point on the collider for example. | ||
{{Note|If you want the same functionality as this node, but want to control when it checks for valid hits, use [[ProtoFlux:Raycast One|Raycast One]] instead.| | {{Note|If you want the same functionality as this node, but want to control when it checks for valid hits, use [[ProtoFlux:Raycast One|Raycast One]] instead.|suggestion}} | ||
== Inputs == | == Inputs == |
Revision as of 20:31, 15 April 2024
The Raycaster
node allows raycast checks, and can take in parameters that sets up the raycast and the validity of what it checks for. When this raycast detects a valid collider, it returns data pertaining to that hit.
This node returns data per frame, and is very useful for debugging and testing hit detection due to its constant updates.
This node can be combined with the Hit UV Coordinate node to get further data from this hit, such as a 2D location point on the collider for example.
Inputs
Origin (float3)
The point where we start this raycast.
Direction (float3)
The direction where this raycast should go in.
MaxDistance (float)
The maximum distance this raycast should go.
HitTriggers (bool)
Should this raycast hit trigger colliders.
UsersOnly (bool)
Should this raycast only hit users.
Root (Slot)
The slot hierarchy this raycast should check for when hitting slots, and only return data from slots it hit from within that slot hierarchy.
Outputs
HasHit (bool)
Returns if the raycast hit anything that is valid.
HitCollider (ICollider)
The collider we detected from this raycast.
HitDistance (float)
The distance from where we hit a valid collider.
HitPoint (float3)
The point in 3D space where we hit this valid collider.
HitNormal (float3)
The facing normal that we hit from a valid collider.
HitTriangleIndex (int)
The triangle mesh number we hit.