1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

KinematicBody split between new CharacterBody and PhysicsBody

PhysicsBody now has methods move_and_collide/test_move and needed
properties for these methods: safe margin, locked axes (3D only).

Moved collision_exceptions from StaticBody to PhysicsBody for 3D
(same as 2D, and conforms to documentation).

RigidBody doesn't have test_motion method anymore, it's now redundant
with PhysicsBody.test_move.
This commit is contained in:
PouleyKetchoupp
2021-05-19 18:14:33 -07:00
parent 766c6dbb24
commit ba13d23140
26 changed files with 592 additions and 793 deletions

View File

@@ -509,12 +509,6 @@ void PhysicsTestMotionResult2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_collider_shape");
}
PhysicsTestMotionResult2D::PhysicsTestMotionResult2D() {
colliding = false;
result.collider_shape = 0;
}
///////////////////////////////////////
bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) {