Automated: update Fields |
add info |
||
Line 7: | Line 7: | ||
|Name=Raycast Driver | |Name=Raycast Driver | ||
}} | }} | ||
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. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|IgnoreHierarchy|Slot| | |IgnoreHierarchy|Slot| a hiearchy of slots which to ignore the colliders for | ||
|FilterDistance|Float| | |FilterDistance|Float| ignore hit detections before this distance. | ||
|Origin|Slot| | |Origin|Slot| The slot to start the raycast from. | ||
|Offset|Float3| | |Offset|Float3| The offset from <code>Origin</code> before starting the raycast. | ||
|Direction|Float3| | |Direction|Float3| The direction in <code>Origin</code>'s local space to shoot in. | ||
|MaxDistance|Float| | |MaxDistance|Float| The maximum distance to raycast for. | ||
|NoHitDistance|Float| | |NoHitDistance|Float| How far to raycast shoot for in meters till reporting no hit. | ||
|Filter|{{RootFieldType|SyncDelegate`1|[[Type:Func`2|Func`2]]<[[Type:ICollider|ICollider]], [[Type:Bool|Bool]]>}}|TypeAdv7=true| | |Filter|{{RootFieldType|SyncDelegate`1|[[Type:Func`2|Func`2]]<[[Type:ICollider|ICollider]], [[Type:Bool|Bool]]>}}|TypeAdv7=true| | ||
|_positionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| | |_positionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| The position to drive (usually the position of the slot this component is on) | ||
|_rotationDrive|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv9=true| | |_rotationDrive|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv9=true| 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). | ||
}} | }} | ||
Line 28: | Line 29: | ||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == 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. | |||
<!--T:5--> | <!--T:5--> | ||
== Related Components == | == Related Components == | ||
</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 00:57, 24 October 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
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. |
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> | |
_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.