Merge pull request #27371 from ShyRed/fixdisabled2dcollisions

Allow adding disabled shapes
This commit is contained in:
Rémi Verschelde 2019-04-30 11:43:11 +02:00 committed by GitHub
commit f40c62fa29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 39 additions and 36 deletions

View File

@ -279,14 +279,14 @@ PhysicsServer::AreaSpaceOverrideMode BulletPhysicsServer::area_get_space_overrid
return area->get_spOv_mode(); return area->get_spOv_mode();
} }
void BulletPhysicsServer::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform) { void BulletPhysicsServer::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform, bool p_disabled) {
AreaBullet *area = area_owner.get(p_area); AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area); ERR_FAIL_COND(!area);
ShapeBullet *shape = shape_owner.get(p_shape); ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform); area->add_shape(shape, p_transform, p_disabled);
} }
void BulletPhysicsServer::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) { void BulletPhysicsServer::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
@ -498,7 +498,7 @@ PhysicsServer::BodyMode BulletPhysicsServer::body_get_mode(RID p_body) const {
return body->get_mode(); return body->get_mode();
} }
void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform) { void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform, bool p_disabled) {
RigidBodyBullet *body = rigid_body_owner.get(p_body); RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND(!body); ERR_FAIL_COND(!body);
@ -506,7 +506,7 @@ void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transfor
ShapeBullet *shape = shape_owner.get(p_shape); ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform); body->add_shape(shape, p_transform, p_disabled);
} }
void BulletPhysicsServer::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) { void BulletPhysicsServer::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {

View File

@ -133,7 +133,7 @@ public:
virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode); virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode);
virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const; virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const;
virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform()); virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape); virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape);
virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform); virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform);
virtual int area_get_shape_count(RID p_area) const; virtual int area_get_shape_count(RID p_area) const;
@ -174,7 +174,7 @@ public:
virtual void body_set_mode(RID p_body, BodyMode p_mode); virtual void body_set_mode(RID p_body, BodyMode p_mode);
virtual BodyMode body_get_mode(RID p_body) const; virtual BodyMode body_get_mode(RID p_body) const;
virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform()); virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
// Not supported, Please remove and add new shape // Not supported, Please remove and add new shape
virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape); virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape);
virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform); virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform);

View File

@ -216,8 +216,8 @@ RigidCollisionObjectBullet::~RigidCollisionObjectBullet() {
} }
} }
void RigidCollisionObjectBullet::add_shape(ShapeBullet *p_shape, const Transform &p_transform) { void RigidCollisionObjectBullet::add_shape(ShapeBullet *p_shape, const Transform &p_transform, bool p_disabled) {
shapes.push_back(ShapeWrapper(p_shape, p_transform, true)); shapes.push_back(ShapeWrapper(p_shape, p_transform, !p_disabled));
p_shape->add_owner(this); p_shape->add_owner(this);
reload_shapes(); reload_shapes();
} }
@ -299,6 +299,8 @@ Transform RigidCollisionObjectBullet::get_shape_transform(int p_index) const {
} }
void RigidCollisionObjectBullet::set_shape_disabled(int p_index, bool p_disabled) { void RigidCollisionObjectBullet::set_shape_disabled(int p_index, bool p_disabled) {
if (shapes[p_index].active != p_disabled)
return;
shapes.write[p_index].active = !p_disabled; shapes.write[p_index].active = !p_disabled;
shape_changed(p_index); shape_changed(p_index);
} }

View File

@ -224,7 +224,7 @@ public:
_FORCE_INLINE_ btCollisionShape *get_main_shape() const { return mainShape; } _FORCE_INLINE_ btCollisionShape *get_main_shape() const { return mainShape; }
void add_shape(ShapeBullet *p_shape, const Transform &p_transform = Transform()); void add_shape(ShapeBullet *p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
void set_shape(int p_index, ShapeBullet *p_shape); void set_shape(int p_index, ShapeBullet *p_shape);
int get_shape_count() const; int get_shape_count() const;

View File

@ -251,9 +251,9 @@ void CollisionObject2D::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape2
s.index = total_subshapes; s.index = total_subshapes;
s.shape = p_shape; s.shape = p_shape;
if (area) { if (area) {
Physics2DServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform); Physics2DServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
} else { } else {
Physics2DServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform); Physics2DServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
} }
sd.shapes.push_back(s); sd.shapes.push_back(s);

View File

@ -259,9 +259,9 @@ void CollisionObject::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape> &
s.index = total_subshapes; s.index = total_subshapes;
s.shape = p_shape; s.shape = p_shape;
if (area) { if (area) {
PhysicsServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform); PhysicsServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
} else { } else {
PhysicsServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform); PhysicsServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
} }
sd.shapes.push_back(s); sd.shapes.push_back(s);

View File

@ -32,13 +32,14 @@
#include "servers/physics/physics_server_sw.h" #include "servers/physics/physics_server_sw.h"
#include "space_sw.h" #include "space_sw.h"
void CollisionObjectSW::add_shape(ShapeSW *p_shape, const Transform &p_transform) { void CollisionObjectSW::add_shape(ShapeSW *p_shape, const Transform &p_transform, bool p_disabled) {
Shape s; Shape s;
s.shape = p_shape; s.shape = p_shape;
s.xform = p_transform; s.xform = p_transform;
s.xform_inv = s.xform.affine_inverse(); s.xform_inv = s.xform.affine_inverse();
s.bpid = 0; //needs update s.bpid = 0; //needs update
s.disabled = p_disabled;
shapes.push_back(s); shapes.push_back(s);
p_shape->add_owner(this); p_shape->add_owner(this);

View File

@ -118,7 +118,7 @@ public:
void _shape_changed(); void _shape_changed();
_FORCE_INLINE_ Type get_type() const { return type; } _FORCE_INLINE_ Type get_type() const { return type; }
void add_shape(ShapeSW *p_shape, const Transform &p_transform = Transform()); void add_shape(ShapeSW *p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
void set_shape(int p_index, ShapeSW *p_shape); void set_shape(int p_index, ShapeSW *p_shape);
void set_shape_transform(int p_index, const Transform &p_transform); void set_shape_transform(int p_index, const Transform &p_transform);
_FORCE_INLINE_ int get_shape_count() const { return shapes.size(); } _FORCE_INLINE_ int get_shape_count() const { return shapes.size(); }

View File

@ -283,7 +283,7 @@ PhysicsServer::AreaSpaceOverrideMode PhysicsServerSW::area_get_space_override_mo
return area->get_space_override_mode(); return area->get_space_override_mode();
} }
void PhysicsServerSW::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform) { void PhysicsServerSW::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform, bool p_disabled) {
AreaSW *area = area_owner.get(p_area); AreaSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area); ERR_FAIL_COND(!area);
@ -291,7 +291,7 @@ void PhysicsServerSW::area_add_shape(RID p_area, RID p_shape, const Transform &p
ShapeSW *shape = shape_owner.get(p_shape); ShapeSW *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform); area->add_shape(shape, p_transform, p_disabled);
} }
void PhysicsServerSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) { void PhysicsServerSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
@ -540,7 +540,7 @@ PhysicsServer::BodyMode PhysicsServerSW::body_get_mode(RID p_body) const {
return body->get_mode(); return body->get_mode();
}; };
void PhysicsServerSW::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform) { void PhysicsServerSW::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform, bool p_disabled) {
BodySW *body = body_owner.get(p_body); BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body); ERR_FAIL_COND(!body);
@ -548,7 +548,7 @@ void PhysicsServerSW::body_add_shape(RID p_body, RID p_shape, const Transform &p
ShapeSW *shape = shape_owner.get(p_shape); ShapeSW *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform); body->add_shape(shape, p_transform, p_disabled);
} }
void PhysicsServerSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) { void PhysicsServerSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {

View File

@ -119,7 +119,7 @@ public:
virtual void area_set_space(RID p_area, RID p_space); virtual void area_set_space(RID p_area, RID p_space);
virtual RID area_get_space(RID p_area) const; virtual RID area_get_space(RID p_area) const;
virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform()); virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape); virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape);
virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform); virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform);
@ -163,7 +163,7 @@ public:
virtual void body_set_mode(RID p_body, BodyMode p_mode); virtual void body_set_mode(RID p_body, BodyMode p_mode);
virtual BodyMode body_get_mode(RID p_body) const; virtual BodyMode body_get_mode(RID p_body) const;
virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform()); virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false);
virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape); virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape);
virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform); virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform);

View File

@ -31,14 +31,14 @@
#include "collision_object_2d_sw.h" #include "collision_object_2d_sw.h"
#include "space_2d_sw.h" #include "space_2d_sw.h"
void CollisionObject2DSW::add_shape(Shape2DSW *p_shape, const Transform2D &p_transform) { void CollisionObject2DSW::add_shape(Shape2DSW *p_shape, const Transform2D &p_transform, bool p_disabled) {
Shape s; Shape s;
s.shape = p_shape; s.shape = p_shape;
s.xform = p_transform; s.xform = p_transform;
s.xform_inv = s.xform.affine_inverse(); s.xform_inv = s.xform.affine_inverse();
s.bpid = 0; //needs update s.bpid = 0; //needs update
s.disabled = false; s.disabled = p_disabled;
s.one_way_collision = false; s.one_way_collision = false;
s.one_way_collision_margin = 0; s.one_way_collision_margin = 0;
shapes.push_back(s); shapes.push_back(s);

View File

@ -111,7 +111,7 @@ public:
void _shape_changed(); void _shape_changed();
_FORCE_INLINE_ Type get_type() const { return type; } _FORCE_INLINE_ Type get_type() const { return type; }
void add_shape(Shape2DSW *p_shape, const Transform2D &p_transform = Transform2D()); void add_shape(Shape2DSW *p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false);
void set_shape(int p_index, Shape2DSW *p_shape); void set_shape(int p_index, Shape2DSW *p_shape);
void set_shape_transform(int p_index, const Transform2D &p_transform); void set_shape_transform(int p_index, const Transform2D &p_transform);
void set_shape_metadata(int p_index, const Variant &p_metadata); void set_shape_metadata(int p_index, const Variant &p_metadata);

View File

@ -378,7 +378,7 @@ Physics2DServer::AreaSpaceOverrideMode Physics2DServerSW::area_get_space_overrid
return area->get_space_override_mode(); return area->get_space_override_mode();
} }
void Physics2DServerSW::area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform) { void Physics2DServerSW::area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform, bool p_disabled) {
Area2DSW *area = area_owner.get(p_area); Area2DSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area); ERR_FAIL_COND(!area);
@ -386,7 +386,7 @@ void Physics2DServerSW::area_add_shape(RID p_area, RID p_shape, const Transform2
Shape2DSW *shape = shape_owner.get(p_shape); Shape2DSW *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform); area->add_shape(shape, p_transform, p_disabled);
} }
void Physics2DServerSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) { void Physics2DServerSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
@ -643,7 +643,7 @@ Physics2DServer::BodyMode Physics2DServerSW::body_get_mode(RID p_body) const {
return body->get_mode(); return body->get_mode();
}; };
void Physics2DServerSW::body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform) { void Physics2DServerSW::body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform, bool p_disabled) {
Body2DSW *body = body_owner.get(p_body); Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body); ERR_FAIL_COND(!body);
@ -651,7 +651,7 @@ void Physics2DServerSW::body_add_shape(RID p_body, RID p_shape, const Transform2
Shape2DSW *shape = shape_owner.get(p_shape); Shape2DSW *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform); body->add_shape(shape, p_transform, p_disabled);
} }
void Physics2DServerSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) { void Physics2DServerSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {

View File

@ -131,7 +131,7 @@ public:
virtual void area_set_space(RID p_area, RID p_space); virtual void area_set_space(RID p_area, RID p_space);
virtual RID area_get_space(RID p_area) const; virtual RID area_get_space(RID p_area) const;
virtual void area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform = Transform2D()); virtual void area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false);
virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape); virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape);
virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform); virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform);
@ -175,7 +175,7 @@ public:
virtual void body_set_mode(RID p_body, BodyMode p_mode); virtual void body_set_mode(RID p_body, BodyMode p_mode);
virtual BodyMode body_get_mode(RID p_body) const; virtual BodyMode body_get_mode(RID p_body) const;
virtual void body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform = Transform2D()); virtual void body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false);
virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape); virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape);
virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform); virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform);
virtual void body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata); virtual void body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata);

View File

@ -140,7 +140,7 @@ public:
FUNC2(area_set_space_override_mode, RID, AreaSpaceOverrideMode); FUNC2(area_set_space_override_mode, RID, AreaSpaceOverrideMode);
FUNC1RC(AreaSpaceOverrideMode, area_get_space_override_mode, RID); FUNC1RC(AreaSpaceOverrideMode, area_get_space_override_mode, RID);
FUNC3(area_add_shape, RID, RID, const Transform2D &); FUNC4(area_add_shape, RID, RID, const Transform2D &, bool);
FUNC3(area_set_shape, RID, int, RID); FUNC3(area_set_shape, RID, int, RID);
FUNC3(area_set_shape_transform, RID, int, const Transform2D &); FUNC3(area_set_shape_transform, RID, int, const Transform2D &);
FUNC3(area_set_shape_disabled, RID, int, bool); FUNC3(area_set_shape_disabled, RID, int, bool);
@ -183,7 +183,7 @@ public:
FUNC2(body_set_mode, RID, BodyMode); FUNC2(body_set_mode, RID, BodyMode);
FUNC1RC(BodyMode, body_get_mode, RID); FUNC1RC(BodyMode, body_get_mode, RID);
FUNC3(body_add_shape, RID, RID, const Transform2D &); FUNC4(body_add_shape, RID, RID, const Transform2D &, bool);
FUNC3(body_set_shape, RID, int, RID); FUNC3(body_set_shape, RID, int, RID);
FUNC3(body_set_shape_transform, RID, int, const Transform2D &); FUNC3(body_set_shape_transform, RID, int, const Transform2D &);
FUNC3(body_set_shape_metadata, RID, int, const Variant &); FUNC3(body_set_shape_metadata, RID, int, const Variant &);

View File

@ -335,7 +335,7 @@ public:
virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) = 0; virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) = 0;
virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const = 0; virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const = 0;
virtual void area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform = Transform2D()) = 0; virtual void area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false) = 0;
virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape) = 0; virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape) = 0;
virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform) = 0; virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform) = 0;
@ -388,7 +388,7 @@ public:
virtual void body_set_mode(RID p_body, BodyMode p_mode) = 0; virtual void body_set_mode(RID p_body, BodyMode p_mode) = 0;
virtual BodyMode body_get_mode(RID p_body) const = 0; virtual BodyMode body_get_mode(RID p_body) const = 0;
virtual void body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform = Transform2D()) = 0; virtual void body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false) = 0;
virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape) = 0; virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape) = 0;
virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform) = 0; virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform) = 0;
virtual void body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata) = 0; virtual void body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata) = 0;

View File

@ -320,7 +320,7 @@ public:
virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) = 0; virtual void area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) = 0;
virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const = 0; virtual AreaSpaceOverrideMode area_get_space_override_mode(RID p_area) const = 0;
virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform()) = 0; virtual void area_add_shape(RID p_area, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false) = 0;
virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape) = 0; virtual void area_set_shape(RID p_area, int p_shape_idx, RID p_shape) = 0;
virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform) = 0; virtual void area_set_shape_transform(RID p_area, int p_shape_idx, const Transform &p_transform) = 0;
@ -372,7 +372,7 @@ public:
virtual void body_set_mode(RID p_body, BodyMode p_mode) = 0; virtual void body_set_mode(RID p_body, BodyMode p_mode) = 0;
virtual BodyMode body_get_mode(RID p_body) const = 0; virtual BodyMode body_get_mode(RID p_body) const = 0;
virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform()) = 0; virtual void body_add_shape(RID p_body, RID p_shape, const Transform &p_transform = Transform(), bool p_disabled = false) = 0;
virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape) = 0; virtual void body_set_shape(RID p_body, int p_shape_idx, RID p_shape) = 0;
virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform) = 0; virtual void body_set_shape_transform(RID p_body, int p_shape_idx, const Transform &p_transform) = 0;