CharacterBody2D

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

There is currently no description for this class. Please help us by contributing one!

Properties

bool

floor_block_on_wall

true

bool

floor_constant_speed

false

float

floor_max_angle

0.785398

float

floor_snap_length

1.0

bool

floor_stop_on_slope

true

int

max_slides

4

MotionMode

motion_mode

0

int

platform_floor_layers

4294967295

PlatformOnLeave

platform_on_leave

0

int

platform_wall_layers

0

float

safe_margin

0.08

bool

slide_on_ceiling

true

Vector2

up_direction

Vector2(0, -1)

Vector2

velocity

Vector2(0, 0)

float

wall_min_slide_angle

0.261799

Methods

void

apply_floor_snap ( )

float

get_floor_angle ( Vector2 up_direction=Vector2(0, -1) ) const

Vector2

get_floor_normal ( ) const

Vector2

get_last_motion ( ) const

KinematicCollision2D

get_last_slide_collision ( )

Vector2

get_platform_velocity ( ) const

Vector2

get_position_delta ( ) const

Vector2

get_real_velocity ( ) const

KinematicCollision2D

get_slide_collision ( int slide_idx )

int

get_slide_collision_count ( ) const

Vector2

get_wall_normal ( ) const

bool

is_on_ceiling ( ) const

bool

is_on_ceiling_only ( ) const

bool

is_on_floor ( ) const

bool

is_on_floor_only ( ) const

bool

is_on_wall ( ) const

bool

is_on_wall_only ( ) const

bool

move_and_slide ( )


Enumerations

enum MotionMode:

MotionMode MOTION_MODE_GROUNDED = 0

There is currently no description for this enum. Please help us by contributing one!

MotionMode MOTION_MODE_FLOATING = 1

There is currently no description for this enum. Please help us by contributing one!


enum PlatformOnLeave:

PlatformOnLeave PLATFORM_ON_LEAVE_ADD_VELOCITY = 0

There is currently no description for this enum. Please help us by contributing one!

PlatformOnLeave PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY = 1

There is currently no description for this enum. Please help us by contributing one!

PlatformOnLeave PLATFORM_ON_LEAVE_DO_NOTHING = 2

There is currently no description for this enum. Please help us by contributing one!


Property Descriptions

bool floor_block_on_wall = true

  • void set_floor_block_on_wall_enabled ( bool value )

  • bool is_floor_block_on_wall_enabled ( )

There is currently no description for this property. Please help us by contributing one!


bool floor_constant_speed = false

  • void set_floor_constant_speed_enabled ( bool value )

  • bool is_floor_constant_speed_enabled ( )

There is currently no description for this property. Please help us by contributing one!


float floor_max_angle = 0.785398

  • void set_floor_max_angle ( float value )

  • float get_floor_max_angle ( )

There is currently no description for this property. Please help us by contributing one!


float floor_snap_length = 1.0

  • void set_floor_snap_length ( float value )

  • float get_floor_snap_length ( )

There is currently no description for this property. Please help us by contributing one!


bool floor_stop_on_slope = true

  • void set_floor_stop_on_slope_enabled ( bool value )

  • bool is_floor_stop_on_slope_enabled ( )

There is currently no description for this property. Please help us by contributing one!


int max_slides = 4

  • void set_max_slides ( int value )

  • int get_max_slides ( )

There is currently no description for this property. Please help us by contributing one!


MotionMode motion_mode = 0

There is currently no description for this property. Please help us by contributing one!


int platform_floor_layers = 4294967295

  • void set_platform_floor_layers ( int value )

  • int get_platform_floor_layers ( )

There is currently no description for this property. Please help us by contributing one!


PlatformOnLeave platform_on_leave = 0

There is currently no description for this property. Please help us by contributing one!


int platform_wall_layers = 0

  • void set_platform_wall_layers ( int value )

  • int get_platform_wall_layers ( )

There is currently no description for this property. Please help us by contributing one!


float safe_margin = 0.08

  • void set_safe_margin ( float value )

  • float get_safe_margin ( )

There is currently no description for this property. Please help us by contributing one!


bool slide_on_ceiling = true

  • void set_slide_on_ceiling_enabled ( bool value )

  • bool is_slide_on_ceiling_enabled ( )

There is currently no description for this property. Please help us by contributing one!


Vector2 up_direction = Vector2(0, -1)

  • void set_up_direction ( Vector2 value )

  • Vector2 get_up_direction ( )

There is currently no description for this property. Please help us by contributing one!


Vector2 velocity = Vector2(0, 0)

There is currently no description for this property. Please help us by contributing one!


float wall_min_slide_angle = 0.261799

  • void set_wall_min_slide_angle ( float value )

  • float get_wall_min_slide_angle ( )

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void apply_floor_snap ( )

There is currently no description for this method. Please help us by contributing one!


float get_floor_angle ( Vector2 up_direction=Vector2(0, -1) ) const

There is currently no description for this method. Please help us by contributing one!


Vector2 get_floor_normal ( ) const

There is currently no description for this method. Please help us by contributing one!


Vector2 get_last_motion ( ) const

There is currently no description for this method. Please help us by contributing one!


KinematicCollision2D get_last_slide_collision ( )

There is currently no description for this method. Please help us by contributing one!


Vector2 get_platform_velocity ( ) const

There is currently no description for this method. Please help us by contributing one!


Vector2 get_position_delta ( ) const

There is currently no description for this method. Please help us by contributing one!


Vector2 get_real_velocity ( ) const

There is currently no description for this method. Please help us by contributing one!


KinematicCollision2D get_slide_collision ( int slide_idx )

There is currently no description for this method. Please help us by contributing one!


int get_slide_collision_count ( ) const

There is currently no description for this method. Please help us by contributing one!


Vector2 get_wall_normal ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_ceiling ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_ceiling_only ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_floor ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_floor_only ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_wall ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_on_wall_only ( ) const

There is currently no description for this method. Please help us by contributing one!


bool move_and_slide ( )

There is currently no description for this method. Please help us by contributing one!