Component:BipedRig: Difference between revisions

From Resonite Wiki
Add info about what happens if there is no BipedRig
fix table for auto process
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
|Name=Biped Rig
|Name=Biped Rig
}}
}}
This component is used by [[ProtoFlux]] and other Resonite systems to read the different parts of an anthro/humanoid avatar by [[Type:BodyNode|Body Node]]. This is created and assigned to by the Assimp import system that [[FrooxEngine]] uses internally, and cannot be edited in game without mods. If this component is deleted, internal code or ProtoFlux might not be able to read what parts of your body are which Body Node designation, and will cause issues in user creations and some FrooxEngine functions. If the Biped Rig is not present or it does not contain the slot for the Body Node, the Body Node search will fallback to looking for AvatarObjectSlot components on the avatar instead.
This component is used by [[ProtoFlux]] and other Resonite systems to read the different parts of an anthro/humanoid avatar by [[Type:BodyNode|Body Node]]. This is created and assigned to by the Assimp import system that [[FrooxEngine]] uses internally, and cannot be edited in game without mods. If this component is deleted, internal code or ProtoFlux might not be able to read what parts of your body are which Body Node designation, and will cause issues in user creations and some FrooxEngine functions. If the Biped Rig is not present or it does not contain the slot for the Body Node, the Body Node search will fallback to looking for AvatarObjectSlot components on the user instead.


== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ForwardAxis|Float3| The forward direction the [[Component:VRIK|VRIK]] should use when setting up the VRIK in the game internally. Is not used after the avatar is generated by Assimp. Mostly for debugging.
|ForwardAxis|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float3|Float3]]>'''|TypeAdv0=true| The forward direction the [[Component:VRIK|VRIK]] should use when setting up the VRIK in the game internally. Is not used after the avatar is generated by Assimp. Mostly for debugging.
|Bones|{{RootFieldType|SyncRefDictionary`2|[[Type:BodyNode|BodyNode]], [[Type:Slot|Slot]]}}|TypeAdv1=true|
}}
}}




=== Special Functions ===
=== Special Functions ===
{| class="wikitable" style="font-size:10pt;"
{{Table ComponentTriggers
! colspan="2" style="background: lightblue; font-size:10pt;" | Custom UI Elements
|GetRigDiagnosticInfo()|null|Gets the list of Body Nodes and their assignments for this component. Usually points to an avatar and it's body bones. Displays it in a text object and shows the bones by name.
|- style="font-size:10pt; text-align:center; font-weight:bold;"
|GenerateDebugVisual()|null|Generates a bunch of boxes that highlight the collider(s) components each body node slot.
| Name
|ClearDebugVisual()|null|Gets rid of any debug visuals that may have been generated by <code>Generate Debug Visuals</code>.
| Description
|OnDetectHandRigs()|null|Will try to detect the hand rigs of both hands based on the current data within the component and the current bone names of the avatar.
|-
|OnDetectLeftHand()|null|Will try to detect the hand rigs of the left hand based on the current data within the component and the current bone names of the avatar.
| Get rig diagnostic info
|OnDetectRightHand()|null|Will try to detect the hand rigs of the right hand based on the current data within the component and the current bone names of the avatar.
| Gets the list of Body Nodes and their assignments for this component. Usually points to an avatar and it's body bones. Displays it in a text object and shows the bones by name.
}}
|-
| Generate Debug Visuals
| Generates a bunch of boxes that highlight the collider(s) components each body node slot.
|-
| Clear Debug Visuals
| Gets rid of any debug visuals that may have been generated by <code>Generate Debug Visuals</code>.
|-
| Detect Hand Rigs
| Will try to detect the hand rigs of both hands based on the current data within the component and the current bone names of the avatar.
|-
| Detect Left Hand Rig
| Will try to detect the hand rigs of the left hand based on the current data within the component and the current bone names of the avatar.
|-
| Detect Right Hand Rig
| Will try to detect the hand rigs of the right hand based on the current data within the component and the current bone names of the avatar.
|}


== Usage ==
== Usage ==
Line 48: Line 33:
== Related Components ==
== Related Components ==


[[Category:Components:Rendering]]
[[Category:Components:Rendering{{#translation:}}|Biped Rig]]
[[Category:Components]]
[[Category:Components{{#translation:}}|Biped Rig]]

Latest revision as of 20:15, 5 November 2024


Component image 
Biped Rig component as seen in the Scene Inspector

This component is used by ProtoFlux and other Resonite systems to read the different parts of an anthro/humanoid avatar by Body Node. This is created and assigned to by the Assimp import system that FrooxEngine uses internally, and cannot be edited in game without mods. If this component is deleted, internal code or ProtoFlux might not be able to read what parts of your body are which Body Node designation, and will cause issues in user creations and some FrooxEngine functions. If the Biped Rig is not present or it does not contain the slot for the Body Node, the Body Node search will fallback to looking for AvatarObjectSlot components on the user instead.

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.
ForwardAxis Nullable`1<Float3> The forward direction the VRIK should use when setting up the VRIK in the game internally. Is not used after the avatar is generated by Assimp. Mostly for debugging.
Bones direct SyncRefDictionary`2<BodyNode, Slot>


Special Functions

Triggers
Method Name Method type and Arguments. Description
GetRigDiagnosticInfo() null Gets the list of Body Nodes and their assignments for this component. Usually points to an avatar and it's body bones. Displays it in a text object and shows the bones by name.
GenerateDebugVisual() null Generates a bunch of boxes that highlight the collider(s) components each body node slot.
ClearDebugVisual() null Gets rid of any debug visuals that may have been generated by Generate Debug Visuals.
OnDetectHandRigs() null Will try to detect the hand rigs of both hands based on the current data within the component and the current bone names of the avatar.
OnDetectLeftHand() null Will try to detect the hand rigs of the left hand based on the current data within the component and the current bone names of the avatar.
OnDetectRightHand() null Will try to detect the hand rigs of the right hand based on the current data within the component and the current bone names of the avatar.

Usage

This component can be used to try to fix malformed or misdetected hands by using it's special functions. It can also be used to check which parts of an avatar are recognised as which Body Nodes for debugging and bug reports.

Examples

Related Issues

Related Components