class

Godot::CharacterBody2D

Inherits Godot::PhysicsBody2D < Godot::CollisionObject2D < Godot::Node2D < Godot::CanvasItem < Godot::Node < Godot::Object < Reference < Object

Specialized 2D physics body for character movement, kinematic platforming, and gravity.

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

Property floor_constant_speed getter

Source
floor_constant_speed=(val)

Property floor_constant_speed setter

Source
floor_constant_speed?
Source
floor_max_angle

Property floor_max_angle getter

Source
floor_max_angle=(val : Number)

Property floor_max_angle setter

Source
floor_normal
Source
floor_snap_length

Property floor_snap_length getter

Source
floor_snap_length=(val : Number)

Property floor_snap_length setter

Source
floor_stop_on_slope

Property floor_stop_on_slope getter

Source
floor_stop_on_slope=(val)

Property floor_stop_on_slope setter

Source
floor_stop_on_slope?
Source
get_floor_angle(up_direction : Vector2) : 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_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) : KinematicCollision2D
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
Source
is_on_floor_only
Source
is_on_wall
Source
is_on_wall_only
Source
is_slide_on_ceiling_enabled
Source
max_slides

Property max_slides getter

Source
max_slides=(val : Int)

Property max_slides setter

Source
motion_mode

Property motion_mode getter

Source
motion_mode=(val : Int)

Property motion_mode setter

Source
move_and_slide
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 : Vector2) : Void
Source
set_velocity(velocity : Vector2) : Void
Source
set_wall_min_slide_angle(radians : Float64) : Void
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 : Vector2)
Source
velocity
Source
velocity=(v : Vector2)
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