Struct godot::classes::CharacterBody3D

#[repr(C)]
pub struct CharacterBody3D { /* private fields */ }
Expand description

Godot class CharacterBody3D.

Inherits PhysicsBody3D.

Related symbols:

See also Godot docs for CharacterBody3D.

§Construction

This class is manually managed. You can create a new instance using CharacterBody3D::new_alloc().

Do not forget to call free() or hand over ownership to Godot.

Implementations§

§

impl CharacterBody3D

pub fn move_and_slide(&mut self) -> bool

pub fn apply_floor_snap(&mut self)

pub fn set_velocity(&mut self, velocity: Vector3)

pub fn get_velocity(&self) -> Vector3

pub fn set_safe_margin(&mut self, margin: f32)

pub fn get_safe_margin(&self) -> f32

pub fn is_floor_stop_on_slope_enabled(&self) -> bool

pub fn set_floor_stop_on_slope_enabled(&mut self, enabled: bool)

pub fn set_floor_constant_speed_enabled(&mut self, enabled: bool)

pub fn is_floor_constant_speed_enabled(&self) -> bool

pub fn set_floor_block_on_wall_enabled(&mut self, enabled: bool)

pub fn is_floor_block_on_wall_enabled(&self) -> bool

pub fn set_slide_on_ceiling_enabled(&mut self, enabled: bool)

pub fn is_slide_on_ceiling_enabled(&self) -> bool

pub fn set_platform_floor_layers(&mut self, exclude_layer: u32)

pub fn get_platform_floor_layers(&self) -> u32

pub fn set_platform_wall_layers(&mut self, exclude_layer: u32)

pub fn get_platform_wall_layers(&self) -> u32

pub fn get_max_slides(&self) -> i32

pub fn set_max_slides(&mut self, max_slides: i32)

pub fn get_floor_max_angle(&self) -> f32

pub fn set_floor_max_angle(&mut self, radians: f32)

pub fn get_floor_snap_length(&mut self) -> f32

pub fn set_floor_snap_length(&mut self, floor_snap_length: f32)

pub fn get_wall_min_slide_angle(&self) -> f32

pub fn set_wall_min_slide_angle(&mut self, radians: f32)

pub fn get_up_direction(&self) -> Vector3

pub fn set_up_direction(&mut self, up_direction: Vector3)

pub fn set_motion_mode(&mut self, mode: MotionMode)

pub fn get_motion_mode(&self) -> MotionMode

pub fn set_platform_on_leave( &mut self, on_leave_apply_velocity: PlatformOnLeave, )

pub fn get_platform_on_leave(&self) -> PlatformOnLeave

pub fn is_on_floor(&self) -> bool

pub fn is_on_floor_only(&self) -> bool

pub fn is_on_ceiling(&self) -> bool

pub fn is_on_ceiling_only(&self) -> bool

pub fn is_on_wall(&self) -> bool

pub fn is_on_wall_only(&self) -> bool

pub fn get_floor_normal(&self) -> Vector3

pub fn get_wall_normal(&self) -> Vector3

pub fn get_last_motion(&self) -> Vector3

pub fn get_position_delta(&self) -> Vector3

pub fn get_real_velocity(&self) -> Vector3

pub fn get_floor_angle(&self) -> f32

pub fn get_floor_angle_ex(&self) -> ExGetFloorAngle<'_>

pub fn get_platform_velocity(&self) -> Vector3

pub fn get_platform_angular_velocity(&self) -> Vector3

pub fn get_slide_collision_count(&self) -> i32

pub fn get_slide_collision( &mut self, slide_idx: i32, ) -> Option<Gd<KinematicCollision3D>>

pub fn get_last_slide_collision(&mut self) -> Option<Gd<KinematicCollision3D>>

Methods from Deref<Target = PhysicsBody3D>§

pub fn move_and_collide( &mut self, motion: Vector3, ) -> Option<Gd<KinematicCollision3D>>

pub fn move_and_collide_ex(&mut self, motion: Vector3) -> ExMoveAndCollide<'_>

pub fn test_move(&mut self, from: Transform3D, motion: Vector3) -> bool

pub fn test_move_ex( &mut self, from: Transform3D, motion: Vector3, ) -> ExTestMove<'_>

pub fn get_gravity(&self) -> Vector3

pub fn set_axis_lock(&mut self, axis: BodyAxis, lock: bool)

pub fn get_axis_lock(&self, axis: BodyAxis) -> bool

pub fn get_collision_exceptions(&mut self) -> Array<Gd<PhysicsBody3D>>

pub fn add_collision_exception_with(&mut self, body: Gd<Node>)

pub fn remove_collision_exception_with(&mut self, body: Gd<Node>)

Methods from Deref<Target = CollisionObject3D>§

pub fn set_collision_layer(&mut self, layer: u32)

pub fn get_collision_layer(&self) -> u32

pub fn set_collision_mask(&mut self, mask: u32)

pub fn get_collision_mask(&self) -> u32

pub fn set_collision_layer_value(&mut self, layer_number: i32, value: bool)

pub fn get_collision_layer_value(&self, layer_number: i32) -> bool

pub fn set_collision_mask_value(&mut self, layer_number: i32, value: bool)

pub fn get_collision_mask_value(&self, layer_number: i32) -> bool

pub fn set_collision_priority(&mut self, priority: f32)

pub fn get_collision_priority(&self) -> f32

pub fn set_disable_mode(&mut self, mode: DisableMode)

pub fn get_disable_mode(&self) -> DisableMode

pub fn set_ray_pickable(&mut self, ray_pickable: bool)

pub fn is_ray_pickable(&self) -> bool

pub fn set_capture_input_on_drag(&mut self, enable: bool)

pub fn get_capture_input_on_drag(&self) -> bool

pub fn get_rid(&self) -> Rid

pub fn create_shape_owner(&mut self, owner: Gd<Object>) -> u32

pub fn remove_shape_owner(&mut self, owner_id: u32)

pub fn get_shape_owners(&mut self) -> PackedInt32Array

pub fn shape_owner_set_transform( &mut self, owner_id: u32, transform: Transform3D, )

pub fn shape_owner_get_transform(&self, owner_id: u32) -> Transform3D

pub fn shape_owner_get_owner(&self, owner_id: u32) -> Option<Gd<Object>>

pub fn shape_owner_set_disabled(&mut self, owner_id: u32, disabled: bool)

pub fn is_shape_owner_disabled(&self, owner_id: u32) -> bool

pub fn shape_owner_add_shape(&mut self, owner_id: u32, shape: Gd<Shape3D>)

pub fn shape_owner_get_shape_count(&self, owner_id: u32) -> i32

pub fn shape_owner_get_shape( &self, owner_id: u32, shape_id: i32, ) -> Option<Gd<Shape3D>>

pub fn shape_owner_get_shape_index(&self, owner_id: u32, shape_id: i32) -> i32

pub fn shape_owner_remove_shape(&mut self, owner_id: u32, shape_id: i32)

pub fn shape_owner_clear_shapes(&mut self, owner_id: u32)

pub fn shape_find_owner(&self, shape_index: i32) -> u32

Methods from Deref<Target = Node3D>§

pub fn set_transform(&mut self, local: Transform3D)

pub fn get_transform(&self) -> Transform3D

pub fn set_position(&mut self, position: Vector3)

pub fn get_position(&self) -> Vector3

pub fn set_rotation(&mut self, euler_radians: Vector3)

pub fn get_rotation(&self) -> Vector3

pub fn set_rotation_degrees(&mut self, euler_degrees: Vector3)

pub fn get_rotation_degrees(&self) -> Vector3

pub fn set_rotation_order(&mut self, order: EulerOrder)

pub fn get_rotation_order(&self) -> EulerOrder

pub fn set_rotation_edit_mode(&mut self, edit_mode: RotationEditMode)

pub fn get_rotation_edit_mode(&self) -> RotationEditMode

pub fn set_scale(&mut self, scale: Vector3)

pub fn get_scale(&self) -> Vector3

pub fn set_quaternion(&mut self, quaternion: Quaternion)

pub fn get_quaternion(&self) -> Quaternion

pub fn set_basis(&mut self, basis: Basis)

pub fn get_basis(&self) -> Basis

pub fn set_global_transform(&mut self, global: Transform3D)

pub fn get_global_transform(&self) -> Transform3D

pub fn set_global_position(&mut self, position: Vector3)

pub fn get_global_position(&self) -> Vector3

pub fn set_global_basis(&mut self, basis: Basis)

pub fn get_global_basis(&self) -> Basis

pub fn set_global_rotation(&mut self, euler_radians: Vector3)

pub fn get_global_rotation(&self) -> Vector3

pub fn set_global_rotation_degrees(&mut self, euler_degrees: Vector3)

pub fn get_global_rotation_degrees(&self) -> Vector3

pub fn get_parent_node_3d(&self) -> Option<Gd<Node3D>>

pub fn set_ignore_transform_notification(&mut self, enabled: bool)

pub fn set_as_top_level(&mut self, enable: bool)

pub fn is_set_as_top_level(&self) -> bool

pub fn set_disable_scale(&mut self, disable: bool)

pub fn is_scale_disabled(&self) -> bool

pub fn get_world_3d(&self) -> Option<Gd<World3D>>

pub fn force_update_transform(&mut self)

pub fn set_visibility_parent(&mut self, path: NodePath)

pub fn get_visibility_parent(&self) -> NodePath

pub fn update_gizmos(&mut self)

pub fn add_gizmo(&mut self, gizmo: Gd<Node3DGizmo>)

pub fn get_gizmos(&self) -> Array<Gd<Node3DGizmo>>

pub fn clear_gizmos(&mut self)

pub fn set_subgizmo_selection( &mut self, gizmo: Gd<Node3DGizmo>, id: i32, transform: Transform3D, )

pub fn clear_subgizmo_selection(&mut self)

pub fn set_visible(&mut self, visible: bool)

pub fn is_visible(&self) -> bool

pub fn is_visible_in_tree(&self) -> bool

pub fn show(&mut self)

pub fn hide(&mut self)

pub fn set_notify_local_transform(&mut self, enable: bool)

pub fn is_local_transform_notification_enabled(&self) -> bool

pub fn set_notify_transform(&mut self, enable: bool)

pub fn is_transform_notification_enabled(&self) -> bool

pub fn rotate(&mut self, axis: Vector3, angle: f32)

pub fn global_rotate(&mut self, axis: Vector3, angle: f32)

pub fn global_scale(&mut self, scale: Vector3)

pub fn global_translate(&mut self, offset: Vector3)

pub fn rotate_object_local(&mut self, axis: Vector3, angle: f32)

pub fn scale_object_local(&mut self, scale: Vector3)

pub fn translate_object_local(&mut self, offset: Vector3)

pub fn rotate_x(&mut self, angle: f32)

pub fn rotate_y(&mut self, angle: f32)

pub fn rotate_z(&mut self, angle: f32)

pub fn translate(&mut self, offset: Vector3)

pub fn orthonormalize(&mut self)

pub fn set_identity(&mut self)

pub fn look_at(&mut self, target: Vector3)

pub fn look_at_ex(&mut self, target: Vector3) -> ExLookAt<'_>

pub fn look_at_from_position(&mut self, position: Vector3, target: Vector3)

pub fn look_at_from_position_ex( &mut self, position: Vector3, target: Vector3, ) -> ExLookAtFromPosition<'_>

pub fn to_local(&self, global_point: Vector3) -> Vector3

pub fn to_global(&self, local_point: Vector3) -> Vector3

pub fn notify(&mut self, what: Node3DNotification)

⚠️ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godot’s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

§Panics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: Node3DNotification)

⚠️ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Methods from Deref<Target = Node>§

pub fn get_node_as<T>(&self, path: impl Into<NodePath>) -> Gd<T>
where T: Inherits<Node>,

⚠️ Retrieves the node at path path, panicking if not found or bad type.

§Panics

If the node is not found, or if it does not have type T or inherited.

pub fn try_get_node_as<T>(&self, path: impl Into<NodePath>) -> Option<Gd<T>>
where T: Inherits<Node>,

Retrieves the node at path path (fallible).

If the node is not found, or if it does not have type T or inherited, None will be returned.

pub fn add_sibling(&mut self, sibling: Gd<Node>)

pub fn add_sibling_ex(&mut self, sibling: Gd<Node>) -> ExAddSibling<'_>

pub fn set_name(&mut self, name: GString)

pub fn get_name(&self) -> StringName

pub fn add_child(&mut self, node: Gd<Node>)

pub fn add_child_ex(&mut self, node: Gd<Node>) -> ExAddChild<'_>

pub fn remove_child(&mut self, node: Gd<Node>)

pub fn reparent(&mut self, new_parent: Gd<Node>)

pub fn reparent_ex(&mut self, new_parent: Gd<Node>) -> ExReparent<'_>

pub fn get_child_count(&self) -> i32

pub fn get_child_count_ex(&self) -> ExGetChildCount<'_>

pub fn get_children(&self) -> Array<Gd<Node>>

pub fn get_children_ex(&self) -> ExGetChildren<'_>

pub fn get_child(&self, idx: i32) -> Option<Gd<Node>>

pub fn get_child_ex(&self, idx: i32) -> ExGetChild<'_>

pub fn has_node(&self, path: NodePath) -> bool

pub fn get_node_or_null(&self, path: NodePath) -> Option<Gd<Node>>

pub fn get_parent(&self) -> Option<Gd<Node>>

pub fn find_child(&self, pattern: GString) -> Option<Gd<Node>>

pub fn find_child_ex(&self, pattern: GString) -> ExFindChild<'_>

pub fn find_children(&self, pattern: GString) -> Array<Gd<Node>>

pub fn find_children_ex(&self, pattern: GString) -> ExFindChildren<'_>

pub fn find_parent(&self, pattern: GString) -> Option<Gd<Node>>

pub fn has_node_and_resource(&self, path: NodePath) -> bool

pub fn get_node_and_resource(&mut self, path: NodePath) -> OutArray

pub fn is_inside_tree(&self) -> bool

pub fn is_part_of_edited_scene(&self) -> bool

pub fn is_ancestor_of(&self, node: Gd<Node>) -> bool

pub fn is_greater_than(&self, node: Gd<Node>) -> bool

pub fn get_path(&self) -> NodePath

pub fn get_path_to(&self, node: Gd<Node>) -> NodePath

pub fn get_path_to_ex(&self, node: Gd<Node>) -> ExGetPathTo<'_>

pub fn add_to_group(&mut self, group: StringName)

pub fn add_to_group_ex(&mut self, group: StringName) -> ExAddToGroup<'_>

pub fn remove_from_group(&mut self, group: StringName)

pub fn is_in_group(&self, group: StringName) -> bool

pub fn move_child(&mut self, child_node: Gd<Node>, to_index: i32)

pub fn get_groups(&self) -> Array<StringName>

pub fn set_owner(&mut self, owner: Gd<Node>)

pub fn get_owner(&self) -> Option<Gd<Node>>

pub fn get_index(&self) -> i32

pub fn get_index_ex(&self) -> ExGetIndex<'_>

pub fn print_tree(&mut self)

pub fn print_tree_pretty(&mut self)

pub fn get_tree_string(&mut self) -> GString

pub fn get_tree_string_pretty(&mut self) -> GString

pub fn set_scene_file_path(&mut self, scene_file_path: GString)

pub fn get_scene_file_path(&self) -> GString

pub fn propagate_notification(&mut self, what: i32)

pub fn propagate_call(&mut self, method: StringName)

pub fn propagate_call_ex(&mut self, method: StringName) -> ExPropagateCall<'_>

pub fn set_physics_process(&mut self, enable: bool)

pub fn get_physics_process_delta_time(&self) -> f64

pub fn is_physics_processing(&self) -> bool

pub fn get_process_delta_time(&self) -> f64

pub fn set_process(&mut self, enable: bool)

pub fn set_process_priority(&mut self, priority: i32)

pub fn get_process_priority(&self) -> i32

pub fn set_physics_process_priority(&mut self, priority: i32)

pub fn get_physics_process_priority(&self) -> i32

pub fn is_processing(&self) -> bool

pub fn set_process_input(&mut self, enable: bool)

pub fn is_processing_input(&self) -> bool

pub fn set_process_shortcut_input(&mut self, enable: bool)

pub fn is_processing_shortcut_input(&self) -> bool

pub fn set_process_unhandled_input(&mut self, enable: bool)

pub fn is_processing_unhandled_input(&self) -> bool

pub fn set_process_unhandled_key_input(&mut self, enable: bool)

pub fn is_processing_unhandled_key_input(&self) -> bool

pub fn set_process_mode(&mut self, mode: ProcessMode)

pub fn get_process_mode(&self) -> ProcessMode

pub fn can_process(&self) -> bool

pub fn set_process_thread_group(&mut self, mode: ProcessThreadGroup)

pub fn get_process_thread_group(&self) -> ProcessThreadGroup

pub fn set_process_thread_messages(&mut self, flags: ProcessThreadMessages)

pub fn get_process_thread_messages(&self) -> ProcessThreadMessages

pub fn set_process_thread_group_order(&mut self, order: i32)

pub fn get_process_thread_group_order(&self) -> i32

pub fn set_display_folded(&mut self, fold: bool)

pub fn is_displayed_folded(&self) -> bool

pub fn set_process_internal(&mut self, enable: bool)

pub fn is_processing_internal(&self) -> bool

pub fn set_physics_process_internal(&mut self, enable: bool)

pub fn is_physics_processing_internal(&self) -> bool

pub fn set_physics_interpolation_mode(&mut self, mode: PhysicsInterpolationMode)

pub fn get_physics_interpolation_mode(&self) -> PhysicsInterpolationMode

pub fn is_physics_interpolated(&self) -> bool

pub fn is_physics_interpolated_and_enabled(&self) -> bool

pub fn reset_physics_interpolation(&mut self)

pub fn set_auto_translate_mode(&mut self, mode: AutoTranslateMode)

pub fn get_auto_translate_mode(&self) -> AutoTranslateMode

pub fn get_window(&self) -> Option<Gd<Window>>

pub fn get_last_exclusive_window(&self) -> Option<Gd<Window>>

pub fn get_tree(&self) -> Option<Gd<SceneTree>>

pub fn create_tween(&mut self) -> Option<Gd<Tween>>

pub fn duplicate(&self) -> Option<Gd<Node>>

pub fn duplicate_ex(&self) -> ExDuplicate<'_>

pub fn replace_by(&mut self, node: Gd<Node>)

pub fn replace_by_ex(&mut self, node: Gd<Node>) -> ExReplaceBy<'_>

pub fn set_scene_instance_load_placeholder(&mut self, load_placeholder: bool)

pub fn get_scene_instance_load_placeholder(&self) -> bool

pub fn set_editable_instance(&mut self, node: Gd<Node>, is_editable: bool)

pub fn is_editable_instance(&self, node: Gd<Node>) -> bool

pub fn get_viewport(&self) -> Option<Gd<Viewport>>

pub fn queue_free(&mut self)

pub fn request_ready(&mut self)

pub fn is_node_ready(&self) -> bool

pub fn set_multiplayer_authority(&mut self, id: i32)

pub fn set_multiplayer_authority_ex( &mut self, id: i32, ) -> ExSetMultiplayerAuthority<'_>

pub fn get_multiplayer_authority(&self) -> i32

pub fn is_multiplayer_authority(&self) -> bool

pub fn get_multiplayer(&self) -> Option<Gd<MultiplayerApi>>

pub fn rpc_config(&mut self, method: StringName, config: Variant)

pub fn set_editor_description(&mut self, editor_description: GString)

pub fn get_editor_description(&self) -> GString

pub fn set_unique_name_in_owner(&mut self, enable: bool)

pub fn is_unique_name_in_owner(&self) -> bool

pub fn atr(&self, message: GString) -> GString

pub fn atr_ex(&self, message: GString) -> ExAtr<'_>

pub fn atr_n( &self, message: GString, plural_message: StringName, n: i32, ) -> GString

pub fn atr_n_ex( &self, message: GString, plural_message: StringName, n: i32, ) -> ExAtrN<'_>

pub fn rpc(&mut self, method: StringName, varargs: &[Variant]) -> Error

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_rpc( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Error, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn rpc_id( &mut self, peer_id: i64, method: StringName, varargs: &[Variant], ) -> Error

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_rpc_id( &mut self, peer_id: i64, method: StringName, varargs: &[Variant], ) -> Result<Error, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn update_configuration_warnings(&mut self)

pub fn call_deferred_thread_group( &mut self, method: StringName, varargs: &[Variant], ) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_deferred_thread_group( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_deferred_thread_group( &mut self, property: StringName, value: Variant, )

pub fn notify_deferred_thread_group(&mut self, what: i32)

pub fn call_thread_safe( &mut self, method: StringName, varargs: &[Variant], ) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_thread_safe( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_thread_safe(&mut self, property: StringName, value: Variant)

pub fn notify_thread_safe(&mut self, what: i32)

pub fn notify(&mut self, what: NodeNotification)

⚠️ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godot’s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

§Panics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: NodeNotification)

⚠️ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Methods from Deref<Target = Object>§

pub fn get_class(&self) -> GString

pub fn is_class(&self, class: GString) -> bool

pub fn set(&mut self, property: StringName, value: Variant)

pub fn get(&self, property: StringName) -> Variant

pub fn set_indexed(&mut self, property_path: NodePath, value: Variant)

pub fn get_indexed(&self, property_path: NodePath) -> Variant

pub fn get_property_list(&self) -> Array<Dictionary>

pub fn get_method_list(&self) -> Array<Dictionary>

pub fn property_can_revert(&self, property: StringName) -> bool

pub fn property_get_revert(&self, property: StringName) -> Variant

pub fn set_script(&mut self, script: Variant)

pub fn get_script(&self) -> Variant

pub fn set_meta(&mut self, name: StringName, value: Variant)

pub fn remove_meta(&mut self, name: StringName)

pub fn get_meta(&self, name: StringName) -> Variant

pub fn get_meta_ex(&self, name: StringName) -> ExGetMeta<'_>

pub fn has_meta(&self, name: StringName) -> bool

pub fn get_meta_list(&self) -> Array<StringName>

pub fn add_user_signal(&mut self, signal: GString)

pub fn add_user_signal_ex(&mut self, signal: GString) -> ExAddUserSignal<'_>

pub fn has_user_signal(&self, signal: StringName) -> bool

pub fn remove_user_signal(&mut self, signal: StringName)

pub fn emit_signal(&mut self, signal: StringName, varargs: &[Variant]) -> Error

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_emit_signal( &mut self, signal: StringName, varargs: &[Variant], ) -> Result<Error, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call(&mut self, method: StringName, varargs: &[Variant]) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_deferred(&mut self, property: StringName, value: Variant)

pub fn callv(&mut self, method: StringName, arg_array: OutArray) -> Variant

pub fn has_method(&self, method: StringName) -> bool

pub fn get_method_argument_count(&self, method: StringName) -> i32

pub fn has_signal(&self, signal: StringName) -> bool

pub fn get_signal_list(&self) -> Array<Dictionary>

pub fn get_signal_connection_list( &self, signal: StringName, ) -> Array<Dictionary>

pub fn get_incoming_connections(&self) -> Array<Dictionary>

pub fn connect(&mut self, signal: StringName, callable: Callable) -> Error

pub fn connect_ex( &mut self, signal: StringName, callable: Callable, ) -> ExConnect<'_>

pub fn disconnect(&mut self, signal: StringName, callable: Callable)

pub fn is_connected(&self, signal: StringName, callable: Callable) -> bool

pub fn set_block_signals(&mut self, enable: bool)

pub fn is_blocking_signals(&self) -> bool

pub fn notify_property_list_changed(&mut self)

pub fn set_message_translation(&mut self, enable: bool)

pub fn can_translate_messages(&self) -> bool

pub fn tr(&self, message: StringName) -> GString

pub fn tr_ex(&self, message: StringName) -> ExTr<'_>

pub fn tr_n( &self, message: StringName, plural_message: StringName, n: i32, ) -> GString

pub fn tr_n_ex( &self, message: StringName, plural_message: StringName, n: i32, ) -> ExTrN<'_>

pub fn is_queued_for_deletion(&self) -> bool

pub fn cancel_free(&mut self)

pub fn notify(&mut self, what: ObjectNotification)

⚠️ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godot’s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

§Panics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: ObjectNotification)

⚠️ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Trait Implementations§

§

impl Bounds for CharacterBody3D

§

type Memory = MemManual

Defines the memory strategy of the static type.
§

type Declarer = DeclEngine

Whether this class is a core Godot class provided by the engine, or declared by the user as a Rust struct.
§

impl Debug for CharacterBody3D

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for CharacterBody3D

§

type Target = PhysicsBody3D

The resulting type after dereferencing.
§

fn deref(&self) -> &<CharacterBody3D as Deref>::Target

Dereferences the value.
§

impl DerefMut for CharacterBody3D

§

fn deref_mut(&mut self) -> &mut <CharacterBody3D as Deref>::Target

Mutably dereferences the value.
§

impl GodotClass for CharacterBody3D

§

type Base = PhysicsBody3D

The immediate superclass of T. This is always a Godot engine class.
§

fn class_name() -> ClassName

The name of the class, under which it is registered in Godot. Read more
§

const INIT_LEVEL: InitLevel = crate::init::InitLevel::Scene

Initialization level, during which this class should be initialized with Godot. Read more
§

fn inherits<U>() -> bool
where U: GodotClass,

Returns whether Self inherits from U. Read more
§

impl GodotDefault for CharacterBody3D

§

impl Inherits<CollisionObject3D> for CharacterBody3D

§

impl Inherits<Node> for CharacterBody3D

§

impl Inherits<Node3D> for CharacterBody3D

§

impl Inherits<Object> for CharacterBody3D

§

impl Inherits<PhysicsBody3D> for CharacterBody3D

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> NewAlloc for T
where T: GodotDefault<Memory = MemManual> + Bounds,

§

fn new_alloc() -> Gd<T>

Return a new, manually-managed Gd containing a default-constructed instance. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Inherits<T> for T
where T: GodotClass,