Separate space override modes for gravity/damping in Area
Also make inspector clearer for gravity point properties.
This commit is contained in:
parent
eb98fd9442
commit
3d1c123d45
32 changed files with 621 additions and 332 deletions
|
|
@ -219,7 +219,7 @@ RID GodotPhysicsServer3D::area_create() {
|
|||
RID rid = area_owner.make_rid(area);
|
||||
area->set_self(rid);
|
||||
return rid;
|
||||
};
|
||||
}
|
||||
|
||||
void GodotPhysicsServer3D::area_set_space(RID p_area, RID p_space) {
|
||||
GodotArea3D *area = area_owner.get_or_null(p_area);
|
||||
|
|
@ -237,7 +237,7 @@ void GodotPhysicsServer3D::area_set_space(RID p_area, RID p_space) {
|
|||
|
||||
area->clear_constraints();
|
||||
area->set_space(space);
|
||||
};
|
||||
}
|
||||
|
||||
RID GodotPhysicsServer3D::area_get_space(RID p_area) const {
|
||||
GodotArea3D *area = area_owner.get_or_null(p_area);
|
||||
|
|
@ -248,20 +248,6 @@ RID GodotPhysicsServer3D::area_get_space(RID p_area) const {
|
|||
return RID();
|
||||
}
|
||||
return space->get_self();
|
||||
};
|
||||
|
||||
void GodotPhysicsServer3D::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
|
||||
GodotArea3D *area = area_owner.get_or_null(p_area);
|
||||
ERR_FAIL_COND(!area);
|
||||
|
||||
area->set_space_override_mode(p_mode);
|
||||
}
|
||||
|
||||
PhysicsServer3D::AreaSpaceOverrideMode GodotPhysicsServer3D::area_get_space_override_mode(RID p_area) const {
|
||||
const GodotArea3D *area = area_owner.get_or_null(p_area);
|
||||
ERR_FAIL_COND_V(!area, AREA_SPACE_OVERRIDE_DISABLED);
|
||||
|
||||
return area->get_space_override_mode();
|
||||
}
|
||||
|
||||
void GodotPhysicsServer3D::area_add_shape(RID p_area, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue