class

Godot::CharacterBody3D

Inherits Godot::PhysicsBody3D < Godot::CollisionObject3D < Godot::Node3D < Godot::Node < Godot::Object < Reference < Object

Specialized 3D physics body for characters, kinematic controllers, and navigation.

Constructors

new(pointer : Pointer(Void) = Pointer(Void).null)
Source

Instance methods

apply_floor_snap
Source
floor_block_on_wall

Property floor_block_on_wall getter

Source
floor_block_on_wall=(val)

Property floor_block_on_wall setter

Source
floor_block_on_wall?
Source
floor_constant_speed
Source
floor_constant_speed=(v : Bool)
Source
floor_max_angle
Source
floor_max_angle=(v : Float64)
Source
floor_normal
Source
floor_snap_length
Source
floor_snap_length=(v : Float64)
Source
floor_stop_on_slope
Source
floor_stop_on_slope=(v : Bool)
Source
get_floor_angle(up_direction : Vector3) : Float64
Source
get_floor_max_angle
Source
get_floor_normal
Source
get_floor_snap_length
Source
get_last_motion
Source
get_last_slide_collision
Source
get_max_slides
Source
get_motion_mode
Source
get_platform_angular_velocity
Source
get_platform_floor_layers
Source
get_platform_on_leave
Source
get_platform_velocity
Source
get_platform_wall_layers
Source
get_position_delta
Source
get_real_velocity
Source
get_safe_margin
Source
get_slide_collision(slide_idx : Int64) : KinematicCollision3D
Source
get_slide_collision_count
Source
get_up_direction
Source
get_velocity
Source
get_wall_min_slide_angle
Source
get_wall_normal
Source
is_floor_block_on_wall_enabled
Source
is_floor_constant_speed_enabled
Source
is_floor_stop_on_slope_enabled
Source
is_on_ceiling
Source
is_on_ceiling_only
Source
is_on_floor

Returns true if the body is currently resting on a floor collider.

Source
is_on_floor_only
Source
is_on_wall
Source
is_on_wall_only
Source
is_slide_on_ceiling_enabled
Source
max_slides
Source
max_slides=(v : Int64)
Source
motion_mode

Property motion_mode getter

Source
motion_mode=(val : Int)

Property motion_mode setter

Source
move_and_slide

Moves the body along its velocity vector and handles collisions/sliding.

Source
on_ceiling?
Source
on_floor?
Source
on_wall?
Source
platform_floor_layers

Property platform_floor_layers getter

Source
platform_floor_layers=(val : Int)

Property platform_floor_layers setter

Source
platform_on_leave

Property platform_on_leave getter

Source
platform_on_leave=(val : Int)

Property platform_on_leave setter

Source
platform_wall_layers

Property platform_wall_layers getter

Source
platform_wall_layers=(val : Int)

Property platform_wall_layers setter

Source
real_velocity
Source
safe_margin

Property safe_margin getter

Source
safe_margin=(val : Number)

Property safe_margin setter

Source
set_floor_block_on_wall_enabled(enabled : Bool) : Void
Source
set_floor_constant_speed_enabled(enabled : Bool) : Void
Source
set_floor_max_angle(radians : Float64) : Void
Source
set_floor_snap_length(floor_snap_length : Float64) : Void
Source
set_floor_stop_on_slope_enabled(enabled : Bool) : Void
Source
set_max_slides(max_slides : Int64) : Void
Source
set_motion_mode(mode : Int64) : Void
Source
set_platform_floor_layers(exclude_layer : Int64) : Void
Source
set_platform_on_leave(on_leave_apply_velocity : Int64) : Void
Source
set_platform_wall_layers(exclude_layer : Int64) : Void
Source
set_safe_margin(margin : Float64) : Void
Source
set_slide_on_ceiling_enabled(enabled : Bool) : Void
Source
set_up_direction(up_direction : Vector3) : Void
Source
set_velocity(velocity : Vector3) : Void
Source
set_wall_min_slide_angle(radians : Float64) : Void
Source
slide_collision_count
Source
slide_on_ceiling

Property slide_on_ceiling getter

Source
slide_on_ceiling=(val)

Property slide_on_ceiling setter

Source
slide_on_ceiling?
Source
up_direction
Source
up_direction=(v : Vector3)
Source
velocity

Current linear velocity of the character body.

Source
velocity=(v : Vector3)
Source
wall_min_slide_angle

Property wall_min_slide_angle getter

Source
wall_min_slide_angle=(val : Number)

Property wall_min_slide_angle setter

Source

Nested types