|  add info it was missing |  Add related | ||
| Line 33: | Line 33: | ||
| <!--T:5--> | <!--T:5--> | ||
| == Related Components == | == Related Components == | ||
| * The lighter version, [[Component:RayDriver|Ray Driver Component]] | |||
| </translate> | </translate> | ||
| [[Category:Components{{#translation:}}|Raycast Driver]] | [[Category:Components{{#translation:}}|Raycast Driver]] | ||
| [[Category:Components:Transform:Drivers{{#translation:}}|Raycast Driver]] | [[Category:Components:Transform:Drivers{{#translation:}}|Raycast Driver]] | ||
Revision as of 16:47, 24 October 2024
This article or section is a stub. You can help the Resonite wiki by expanding it.
Component image 
Raycast Driver component as seen in the Scene Inspector 

Raycast driver drives the position of a slot to the position of a calculated hit point, and aligns it's rotation to the surface of that hit object.
Fields
| Name | Type | Description | 
|---|---|---|
| persistent | Bool | Determines whether or not this item will be saved to the server. | 
| UpdateOrder | Int | Controls the order in which this component is updated. | 
| Enabled | Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. | 
| IgnoreHierarchy | Slot | a hiearchy of slots which to ignore the colliders for | 
| FilterDistance | Float | ignore hit detections before this distance. | 
| Origin | Slot | The slot to start the raycast from. | 
| Offset | Float3 | The offset from Originbefore starting the raycast. | 
| Direction | Float3 | The direction in Origin's local space to shoot in. | 
| MaxDistance | Float | The maximum distance to raycast for. | 
| NoHitDistance | Float | How far to raycast shoot for in meters till reporting no hit. | 
| Filter | delegate of identity Func`2<ICollider, Bool> | A sync delegate that takes a collider and returns a bool. if a collider returns false from this sync delegate, it is ignored when raycasting for objects. | 
| _positionDrive | field drive of Float3 | The position to drive (usually the position of the slot this component is on) | 
| _rotationDrive | field drive of FloatQ | The rotation to drive (usually the rotation of the slot this component is on). aligns itself to the normal of the surface this raycast hit, or (0,0,0). | 
Usage
Examples
Can be used to place objects onto a floor, or as a laser pointer, or as part of a draw on a surface pen.
Related Components
- The lighter version, Ray Driver Component
