Component:RaycastDriver

From Resonite Wiki
This page contains changes which are not marked for translation.


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

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.
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 Origin before 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 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