Component:Joint: Difference between revisions

From Resonite Wiki
imported>Xekri
No edit summary
 
Automated: update Fields
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages></languages>
<languages></languages>
<translate>
<translate>
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=JointComponent.png
|Image=JointComponent.png
|Name=Joint
|Name=Joint
}}
}}
== Intoduction ==
The Joint component allows for a slot or object to rotate around a single point, in any direction, or around an axis. Common uses are doors, helmet tops, and dials.
the Joint component allows for a slot or object to rotate around a single point, in any direction, or around an axis. common uses are doors, helmet tops, and dials.
 
== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|EditModeOnly|Bool| User can only interact with the joint in Edit Mode
|EditModeOnly|Bool| User can only interact with the joint in [[Edit Mode]]
|AllowSteal|Bool| Controls whether other users can steal the grabbable joint from other players
|AllowSteal|Bool| Controls whether other users can steal the grabbable joint from other players
|DropOnDisable|Bool| Controls whether the user drops the joint if the object has been disabled
|DropOnDisable|Bool| Controls whether the user drops the joint if the object has been disabled
|DontDrive|Bool|  
|DontDrive|Bool|
|AllowOnlyPhysicalGrab|Bool| Only allow grabbing the joint with a physical interaction - remote grabs are not allowed
|AllowOnlyPhysicalGrab|Bool| Only allow grabbing the joint with a physical interaction - remote grabs are not allowed
|ActiveUserFilter|ActiveUserHandling|  
|ActiveUserFilter|ActiveUserHandling|
|CustomGrabCheck|GrabCheck|  
|CustomGrabCheck|{{RootFieldType|SyncDelegate`1|[[Type:GrabCheck|GrabCheck]]}}|TypeAdv6=true|
|_grabber|Grabber|  
|_grabber|'''[[Component:Grabber|Grabber]]'''|TypeAdv7=true|
|_holdSlot|Slot|  
|_holdSlot|Slot|
|_pos|Sync`1|TypeString9=Sync<Float3>|  
|_pos|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv9=true|
|_rot|Sync`1|TypeString10=Sync<FloatQ>|
|_rot|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]&lt;[[Type:FloatQ|FloatQ]]&gt;}}|TypeAdv10=true|
|_scl|Sync`1|TypeString11=Sync<Float3>|  
|_scl|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv11=true|
|__legacyActiveUserRootOnly|Bool|  
|__legacyActiveUserRootOnly|Bool|
|GrabPriority|Int|  
|GrabPriority|Int| {{Template:Grab Priority}}
|MaxSwing|Float|  
|MaxSwing|Float|
|MaxTwist|Float| Maximum amount the joint will rotate in the given axis
|MaxTwist|Float| Maximum amount the joint will rotate in the given axis
|Axis|Float3| Determines which axis the joint rotates on. Use 1 to define the axis, 0 to ignore it
|Axis|Float3| Determines which axis the joint rotates on. Use 1 to define the axis, 0 to ignore it
|TwistReferenceAxis|Float3|  
|TwistReferenceAxis|Float3|
|PositionTwistThresholdAngle|Float|  
|PositionTwistThresholdAngle|Float|
|VibrationAngle|Float|  
|VibrationAngle|Float|
|VibrationPreset|VibratePreset|  
|VibrationPreset|VibratePreset|
|SnapIncrement|Float|  
|SnapIncrement|Float|
|SnapTime|Float| The time it takes for the joint to lerp towards given SnapOrientations. Higher the value the slower it takes
|SnapTime|Float| The time it takes for the joint to lerp towards given SnapOrientations. Higher the value the slower it takes
|SnapOnRelease|Bool| Controls whether the join snaps to given SnapOrientations
|SnapOnRelease|Bool| Controls whether the join snaps to given SnapOrientations
|SnapOrientations|SnapOrientation|  
|SnapOrientations|{{RootFieldType|SyncList`1|[[#SnapOrientation|Joint.SnapOrientation]]}}|TypeAdv24=true|
|origRotation|FloatQ|  
|origRotation|FloatQ|
|rotReference|FloatQ|  
|rotReference|FloatQ|
|dirReference|Float3|  
|dirReference|Float3|
|twistReference|Float3|  
|twistReference|Float3|
|usePositionTwist|Bool|  
|usePositionTwist|Bool|
}}
}}


== Behavior ==
== Usage ==
 
== Examples ==
== Examples ==
* [https://www.youtube.com/watch?v=Ut2rqPmRfzo Using Joint to make A Door Pt. 1] by [[User:ProbablePrime|ProbablePrime]]
Here is a video explaining how joints work by making a door (by [[User:Stellanora|Stellanora]])
* [https://www.youtube.com/watch?v=ql6PNOHT-0s Using Joint to make a Door pt.2] by [[User:ProbablePrime|ProbablePrime]]
<youtube>aLUYB9TMxNw</youtube>
 
Here are some old videos by [[User:ProbablePrime|ProbablePrime]]
Using Joint to make A Door Pt. 1
<youtube>Ut2rqPmRfzo</youtube>
 
Using Joint to make a Door pt.2
<youtube>ql6PNOHT-0s</youtube>


== Related Components ==
== See Also ==
[[:Category:Draggable]]
* [[Component:Slider]]
</translate>
</translate>
[[Category:Components{{#translation:}}|Joint (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Joint]]
[[Category:Transform:Interaction{{#translation:}}|Joint (Component){{#translation:}}]]
[[Category:ComponentStubs]]
[[Category:Draggable]]
[[Category:Components:Transform:Interaction{{#translation:}}|Joint]]
[[Category:Components With Nested Types{{#translation:}}|Joint]]

Revision as of 06:02, 17 March 2025

Component image 
Joint component as seen in the Scene Inspector

The Joint component allows for a slot or object to rotate around a single point, in any direction, or around an axis. Common uses are doors, helmet tops, and dials.

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. Some components stop their functionality when this field is disabled, but some don't.
EditModeOnly Bool User can only interact with the joint in Edit Mode
AllowSteal Bool Controls whether other users can steal the grabbable joint from other players
DropOnDisable Bool Controls whether the user drops the joint if the object has been disabled
DontDrive Bool
AllowOnlyPhysicalGrab Bool Only allow grabbing the joint with a physical interaction - remote grabs are not allowed
ActiveUserFilter ActiveUserHandling
CustomGrabCheck delegate of identity GrabCheck
_grabber Grabber
_holdSlot Slot
_pos reference drive of Sync`1<Float3>
_rot reference drive of Sync`1<FloatQ>
_scl reference drive of Sync`1<Float3>
__legacyActiveUserRootOnly Bool
GrabPriority Int Determines what gets grabbed if several grabbable objects are touching someone's grab sphere. The IGrabbable with the highest priority will be grabbed first. If the highest priority ties with another IGrabbable, it will grab both of those and ignore any lower priority IGrabbables.
MaxSwing Float
MaxTwist Float Maximum amount the joint will rotate in the given axis
Axis Float3 Determines which axis the joint rotates on. Use 1 to define the axis, 0 to ignore it
TwistReferenceAxis Float3
PositionTwistThresholdAngle Float
VibrationAngle Float
VibrationPreset VibratePreset
SnapIncrement Float
SnapTime Float The time it takes for the joint to lerp towards given SnapOrientations. Higher the value the slower it takes
SnapOnRelease Bool Controls whether the join snaps to given SnapOrientations
SnapOrientations list of Joint.SnapOrientation
origRotation FloatQ
rotReference FloatQ
dirReference Float3
twistReference Float3
usePositionTwist Bool

Usage

Examples

Here is a video explaining how joints work by making a door (by Stellanora)

Here are some old videos by ProbablePrime Using Joint to make A Door Pt. 1

Using Joint to make a Door pt.2

See Also