Raycast between a source and target(s).
Suggested use:
Determine if objects are within a certain range, use with colliders to create a line of sight system, or determine if objects are visible at all.
Examples found in: Project 8
| Components | |||
|---|---|---|---|
| Property | Type | Description | Default Value | Component Properties |
| Source Game Object Transform | Transform | Game Object that is casting the ray. | Owner |
| Targets | Array of Game Objects | Game Objects the source is casting rays towards. | 0 |
| Tags | Array of Tags (strings) | Tags to try to cast a ray towards. | 0 |
| Search Distance | Float | How far to cast the ray. By default, look forever. | Infinity |
| Layer Mask | LayerMask | Layer mask to use for filtering. | Everything | Event Sending Info |
| RaycastHitEvent | LPK Event Object | Event to dispatch when conditions are met:
|
None |
| RaycastMaintainedEvent | LPK Event Object | Event to dispatch when conditions are met:
|
None |
| RaycastLostEvent | LPK Event Object | Event to dispatch when conditions are met:
|
None |
| Event Sending Mode | LPK Event Sending Mode | Who receives the event sent info when input is given from the input device. OWNER = only send to components on the same game object. ALL = send to all game objects. TAGS = send to specified tags. | TAGS | Event Sending Mode - TAGS |
| Tags | Array of Tags | Which tags will receive this event. | 0 | Debug Properties |
| Print Debug Info | Boolean | Toggle console debug messages. | False |
| Label | String | Notes for the user about this component. This does nothing to the game or build. | None |