A ray driver is a component that takes a start origin and a direction and drives point A and B via a RayCast, keeping the distance between the two below MaxDistance.
<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|MaxDistance|Float|
|MaxDistance|Float| the max distance that A and B can be from each other
|PointA|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]<[[Type:Float3|Float3]]>}}|TypeAdv1=true| what to drive with the local space start position of the Raycast
|PointB|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]<[[Type:Float3|Float3]]>}}|TypeAdv2=true| what to drive with the local space end point of the raycast
|LocalOrigin|Float3|
|LocalOrigin|Float3| the local space start point of the raycast
|LocalDirection|Float3|
|LocalDirection|Float3| the direction in local space to fire the raycast in.
}}
}}
Line 24:
Line 25:
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Laser pointer or grapple hook. This can be used as a lighter weight version of the [[Component:RaycastDriver|Raycast driver component]]
A ray driver is a component that takes a start origin and a direction and drives point A and B via a RayCast, keeping the distance between the two below MaxDistance.