CharacterCreation3DScene ​
Inherits: Node3D
CharacterCreation3DScene - Manages the 3D character preview in character creation Handles skeleton instantiation, customization preview, and idle animations
Properties ​
Node3D | skeleton_container | |
Array[String] | idle_animation_names | ["Idle", "idle", "IDLE", "Standing"] |
Camera3D | preview_camera | |
float | rotation_speed | 0.5 |
Variables ​
CustomSkeleton | current_skeleton | null |
AnimationPlayer | animation_player | null |
CustomCharacterDefinition | current_definition | null |
String | current_animation_type | "" |
bool | auto_rotate | false |
float | current_rotation | 0.0 |
Methods ​
void | set_skeleton_from_definition( definition: CustomCharacterDefinition ) |
void | set_skeleton_from_scene( scene: PackedScene ) |
void | set_skeleton_from_node( skeleton_node: Node ) |
void | apply_customization( definition: CustomCharacterDefinition ) |
void | update_color( param_name: String, color: Color ) |
void | update_blend_shape( shape_name: String, weight: float ) |
void | play_idle() |
void | play_animation( animation_name: String ) |
void | stop_animation() |
void | set_auto_rotate( enabled: bool ) |
void | set_rotation_angle( angle: float ) |
void | rotate_preview( delta_angle: float ) |
CustomSkeleton | get_skeleton() |
CustomCharacterDefinition | get_definition() |
bool | has_skeleton() |
void | set_animation_type( animation_type: String ) |
void | reset() |
void | apply_template_equipment( template: CharacterDefinition ) |
void | apply_class_equipment( player_class: PlayerClassDefinition ) |
void | clear_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