RigComponent ​
Inherits: Node3D
Inherited by: EntityRigComponent, InteractableRigComponent
Base runtime rig class shared by EntityRigComponent and InteractableRigComponent. Owns all VFX remote transforms, decal indicators, highlight, and transparency logic. Subclasses provide the mesh source and slot-specific remote setup.
Variables ​
bool | outline_eligible | true |
bool | is_transparent | false |
Node3D | rig_owner | null |
AnimationPlayer | animation_player | null |
Decal | hitbox_outline | |
Decal | target_marker | |
Decal | selection_marker | |
Array[Array] | remote_transforms | [[], [], [], [], [], [], [], []] |
Array[RemoteTransform3D] | active_remotes | [] |
Methods ​
void | initialize_rig( owner_node: Node3D ) |
Node3D | get_attachment_point_node( location: VFXSelection.VfxLocation ) |
Array[MeshInstance3D] | material_target_meshes( _target: int, _item: Object = null ) |
bool | apply_vfx_material_effect( selection: VFXSelectionMaterial, timer: Timer = null ) |
bool | cleanup_vfx_material_effect( selection: VFXSelectionMaterial ) |
void | create_remotes_for_slot_index( slot_index: RemoteSlotIndex, parent: Node3D, count: int ) |
void | create_remotes_for_slot_index_with_offset( slot_index: RemoteSlotIndex, parent: Node3D, count: int, offset: Vector3 ) |
RemoteTransform3D | find_available_remote( slot_index: RemoteSlotIndex ) |
RemoteTransform3D | assign_remote_transform( effect_vfx: VFX, location: VFXSelection.VfxLocation ) |
Array[RemoteTransform3D] | assign_remote_transforms_for_hands( right_hand_vfx: VFX, left_hand_vfx: VFX ) |
void | release_remote( remote: RemoteTransform3D ) |
void | animate_transparency( target_alpha: float, duration: float = 3.5 ) |
void | show_rig( duration: float = 3.5 ) |
void | hide_rig( duration: float = 3.5 ) |
void | apply_fog_of_war_state( in_fog: bool ) |
void | set_hitbox_color( color: Color ) |
void | set_combat_outline( in_combat: bool, combat_color: Color = Color.RED ) |
void | set_selection_state( is_current: bool, is_selected: bool, current_color: Color = Color.CYAN, selected_color: Color = Color.GREEN ) |
void | set_mesh_overlay( highlight_type: HighlightType ) |
void | set_target_highlight_with_color( target_color: Color ) |
void | clear_target_marker() |
void | apply_selection_outline( selection_color: Color, power: float = 3.0, intensity: float = 0.5, threshold: float = 0.0 ) |
void | set_visual_layer( layer: int ) |
Enumerations ​
enum RemoteSlotIndex ​
The places on the model where a visual effect can attach (base, hands, head, chest, weapon, feet, overhead).
- BASE =
0 - LEFT_HAND =
1 - RIGHT_HAND =
2 - HEAD =
3 - CHEST =
4 - WEAPON =
5 - FEET =
6 - OVERHEAD =
7
enum HighlightType ​
The highlights of the mesh: default, hover, none or target selected.
- DEFAULT =
0 - HOVER =
1 - NONE =
2 - TARGET_SELECTED =
3
Constants ​
constDEFAULT_REMOTE_POOL_SIZE =10- How many remote transforms are made for each slot.
Variable descriptions ​
bool outline_eligible = true ​
True when the rig may get an outline (a target highlight).
bool is_transparent = false ​
True while the rig is faded out (in fog, or hidden).
Node3D rig_owner = null ​
Stored owner reference — Entity or InteractableObject
AnimationPlayer animation_player = null ​
Animation player reference (populated by subclass during initialize_rig)
Decal hitbox_outline ​
The decal under the entity that shows its hitbox.
Decal target_marker ​
The decal that marks the entity as the target.
Decal selection_marker ​
The decal that marks the entity as selected.
Array[Array] remote_transforms = [[], [], [], [], [], [], [], []] ​
The remote transforms of each slot, ready for a visual effect to use.
Array[RemoteTransform3D] active_remotes = [] ​
The remote transforms a visual effect uses now.
Method descriptions ​
void initialize_rig( owner_node: Node3D ) ​
Single entry point. Stores the owner, creates decals, defers remote setup. Subclasses call super then add their own model instantiation.
Node3D get_attachment_point_node( location: VFXSelection.VfxLocation ) ​
Return the Node3D that physically represents a VfxLocation attachment point.
Array[MeshInstance3D] material_target_meshes( _target: int, _item: Object = null ) ​
The meshes a material effect goes on (the base: all the rig's meshes; an entity's rig picks by the target)
bool apply_vfx_material_effect( selection: VFXSelectionMaterial, timer: Timer = null ) ​
Apply a material effect to the rig's meshes. Returns success.
bool cleanup_vfx_material_effect( selection: VFXSelectionMaterial ) ​
Clean up a previously applied material effect. Returns success.
void create_remotes_for_slot_index( slot_index: RemoteSlotIndex, parent: Node3D, count: int ) ​
Makes remote transforms for a slot on a parent node.
void create_remotes_for_slot_index_with_offset( slot_index: RemoteSlotIndex, parent: Node3D, count: int, offset: Vector3 ) ​
Makes remote transforms for a slot on a parent node, moved by an offset.
RemoteTransform3D find_available_remote( slot_index: RemoteSlotIndex ) ​
A remote transform of the slot that no effect uses, or null.
RemoteTransform3D assign_remote_transform( effect_vfx: VFX, location: VFXSelection.VfxLocation ) ​
Gives a visual effect a remote transform at a place on the model. Hands are made through assign_remote_transforms_for_hands.
Array[RemoteTransform3D] assign_remote_transforms_for_hands( right_hand_vfx: VFX, left_hand_vfx: VFX ) ​
Gives the effects of the right and the left hand a remote transform each.
void release_remote( remote: RemoteTransform3D ) ​
Gives a remote transform back when its effect ends.
void animate_transparency( target_alpha: float, duration: float = 3.5 ) ​
Fades the rig to a transparency (0 = visible, 1 = invisible) over some seconds.
void show_rig( duration: float = 3.5 ) ​
Fades the rig in.
void hide_rig( duration: float = 3.5 ) ​
Fades the rig out.
void apply_fog_of_war_state( in_fog: bool ) ​
Hides the rig when it is in fog, shows it when it is not.
void set_hitbox_color( color: Color ) ​
Sets the color of the hitbox and selection decals.
void set_combat_outline( in_combat: bool, combat_color: Color = Color.RED ) ​
Shows the outline of the entity in the combat color while it fights.
void set_selection_state( is_current: bool, is_selected: bool, current_color: Color = Color.CYAN, selected_color: Color = Color.GREEN ) ​
Shows whether the entity is the current or a selected party member, in the colors given.
void set_mesh_overlay( highlight_type: HighlightType ) ​
Sets the highlight of the mesh (default, hover, none or target selected).
void set_target_highlight_with_color( target_color: Color ) ​
Highlights the entity as the target, in a color.
void clear_target_marker() ​
Hides the target marker.
void apply_selection_outline( selection_color: Color, power: float = 3.0, intensity: float = 0.5, threshold: float = 0.0 ) ​
Draws an outline on the mesh: color, power, intensity and threshold.
void set_visual_layer( layer: int ) ​
Puts the meshes of the rig on a visual layer (1 to 20).