PhysicsBody3D¶
Inherits: CollisionObject3D < Node3D < Node < Object
Inherited By: CharacterBody3D, PhysicalBone3D, RigidBody3D, StaticBody3D
Abstract base class for 3D game objects affected by physics.
Description¶
PhysicsBody3D is an abstract base class for 3D game objects affected by physics. All 3D physics bodies inherit from it.
Warning: With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
Methods¶
void |
add_collision_exception_with ( Node body ) |
get_axis_lock ( BodyAxis axis ) const |
|
move_and_collide ( Vector3 motion, bool test_only=false, float safe_margin=0.001, bool recovery_as_collision=false, int max_collisions=1 ) |
|
void |
remove_collision_exception_with ( Node body ) |
void |
set_axis_lock ( BodyAxis axis, bool lock ) |
test_move ( Transform3D from, Vector3 motion, KinematicCollision3D collision=null, float safe_margin=0.001, bool recovery_as_collision=false, int max_collisions=1 ) |
Property Descriptions¶
bool axis_lock_angular_x = false
Lock the body's rotation in the X axis.
bool axis_lock_angular_y = false
Lock the body's rotation in the Y axis.
bool axis_lock_angular_z = false
Lock the body's rotation in the Z axis.
bool axis_lock_linear_x = false
Lock the body's linear movement in the X axis.
bool axis_lock_linear_y = false
Lock the body's linear movement in the Y axis.
bool axis_lock_linear_z = false