mirror of
https://github.com/godotengine/godot
synced 2024-09-16 02:17:12 +00:00
Merge pull request #54110 from nekomatata/fix-rigid-body-update-collision-layer
This commit is contained in:
commit
fe3d62f2dc
|
@ -276,6 +276,7 @@ PhysicsServer2D::BodyMode GodotBody2D::get_mode() const {
|
||||||
|
|
||||||
void GodotBody2D::_shapes_changed() {
|
void GodotBody2D::_shapes_changed() {
|
||||||
_mass_properties_changed();
|
_mass_properties_changed();
|
||||||
|
wakeup();
|
||||||
wakeup_neighbours();
|
wakeup_neighbours();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,6 +327,8 @@ PhysicsServer3D::BodyMode GodotBody3D::get_mode() const {
|
||||||
|
|
||||||
void GodotBody3D::_shapes_changed() {
|
void GodotBody3D::_shapes_changed() {
|
||||||
_mass_properties_changed();
|
_mass_properties_changed();
|
||||||
|
wakeup();
|
||||||
|
wakeup_neighbours();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GodotBody3D::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_variant) {
|
void GodotBody3D::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_variant) {
|
||||||
|
|
|
@ -584,7 +584,6 @@ void GodotPhysicsServer3D::body_set_collision_layer(RID p_body, uint32_t p_layer
|
||||||
ERR_FAIL_COND(!body);
|
ERR_FAIL_COND(!body);
|
||||||
|
|
||||||
body->set_collision_layer(p_layer);
|
body->set_collision_layer(p_layer);
|
||||||
body->wakeup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GodotPhysicsServer3D::body_get_collision_layer(RID p_body) const {
|
uint32_t GodotPhysicsServer3D::body_get_collision_layer(RID p_body) const {
|
||||||
|
@ -599,7 +598,6 @@ void GodotPhysicsServer3D::body_set_collision_mask(RID p_body, uint32_t p_mask)
|
||||||
ERR_FAIL_COND(!body);
|
ERR_FAIL_COND(!body);
|
||||||
|
|
||||||
body->set_collision_mask(p_mask);
|
body->set_collision_mask(p_mask);
|
||||||
body->wakeup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GodotPhysicsServer3D::body_get_collision_mask(RID p_body) const {
|
uint32_t GodotPhysicsServer3D::body_get_collision_mask(RID p_body) const {
|
||||||
|
|
Loading…
Reference in a new issue