Skip to content

CharacterCreation3DScene ​

Inherits: Node3D

CharacterCreation3DScene - Manages the 3D character preview in character creation Handles skeleton instantiation, customization preview, and idle animations

Properties ​

Node3Dskeleton_container
Array[String]idle_animation_names["Idle", "idle", "IDLE", "Standing"]
Camera3Dpreview_camera
floatrotation_speed0.5

Variables ​

CustomSkeletoncurrent_skeletonnull
AnimationPlayeranimation_playernull
CustomCharacterDefinitioncurrent_definitionnull
Stringcurrent_animation_type""
boolauto_rotatefalse
floatcurrent_rotation0.0

Methods ​

voidset_skeleton_from_definition( definition: CustomCharacterDefinition )
voidset_skeleton_from_scene( scene: PackedScene )
voidset_skeleton_from_node( skeleton_node: Node )
voidapply_customization( definition: CustomCharacterDefinition )
voidupdate_color( param_name: String, color: Color )
voidupdate_blend_shape( shape_name: String, weight: float )
voidplay_idle()
voidplay_animation( animation_name: String )
voidstop_animation()
voidset_auto_rotate( enabled: bool )
voidset_rotation_angle( angle: float )
voidrotate_preview( delta_angle: float )
CustomSkeletonget_skeleton()
CustomCharacterDefinitionget_definition()
boolhas_skeleton()
voidset_animation_type( animation_type: String )
voidreset()
voidapply_template_equipment( template: CharacterDefinition )
voidapply_class_equipment( player_class: PlayerClassDefinition )
voidclear_equipment()

Signals ​

skeleton_changed( skeleton: CustomSkeleton ) ​

Emitted when the model changes.

customization_applied( definition: CustomCharacterDefinition ) ​

Emitted when the choices of the player were applied to the model.

Property descriptions ​

Node3D skeleton_container ​

Node to parent skeletons under (uses self if not set)

Array[String] idle_animation_names = ["Idle", "idle", "IDLE", "Standing"] ​

Default idle animation names to try

Camera3D preview_camera ​

Camera for the preview (optional, for rotation control)

float rotation_speed = 0.5 ​

Rotation speed for preview

Variable descriptions ​

CustomSkeleton current_skeleton = null ​

The currently displayed skeleton

AnimationPlayer animation_player = null ​

Animation player reference (created dynamically)

CustomCharacterDefinition current_definition = null ​

Current character definition being previewed

String current_animation_type = "" ​

Current animation type for this character

bool auto_rotate = false ​

True when the model turns by itself.

float current_rotation = 0.0 ​

How far the model has turned.

Method descriptions ​

void set_skeleton_from_definition( definition: CustomCharacterDefinition ) ​

Set the skeleton from a CustomCharacterDefinition

void set_skeleton_from_scene( scene: PackedScene ) ​

Set skeleton directly from a PackedScene

void set_skeleton_from_node( skeleton_node: Node ) ​

Set skeleton from an existing node (will be reparented)

void apply_customization( definition: CustomCharacterDefinition ) ​

Apply customization to the current skeleton

void update_color( param_name: String, color: Color ) ​

Update a single color on the current skeleton

void update_blend_shape( shape_name: String, weight: float ) ​

Update a single blend shape on the current skeleton

void play_idle() ​

Play idle animation from the animation map

void play_animation( animation_name: String ) ​

Play a specific animation

void stop_animation() ​

Stop current animation

void set_auto_rotate( enabled: bool ) ​

Enable/disable auto rotation

void set_rotation_angle( angle: float ) ​

Set rotation angle directly

void rotate_preview( delta_angle: float ) ​

Rotate by delta

CustomSkeleton get_skeleton() ​

Get the current skeleton

CustomCharacterDefinition get_definition() ​

Get the current definition

bool has_skeleton() ​

Check if skeleton is loaded

void set_animation_type( animation_type: String ) ​

Set the animation type and replay idle animation

void reset() ​

Reset the preview scene

void apply_template_equipment( template: CharacterDefinition ) ​

Apply starter equipment from a CharacterDefinition (template mode)

void apply_class_equipment( player_class: PlayerClassDefinition ) ​

Apply starter equipment from a PlayerClassDefinition (custom character mode)

void clear_equipment() ​

Clear all equipment from the skeleton