You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Transform CSGShape collision when necessary
This commit is contained in:
@@ -511,6 +511,12 @@ void CSGShape3D::_notification(int p_what) {
|
|||||||
_make_dirty();
|
_make_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_what == NOTIFICATION_TRANSFORM_CHANGED) {
|
||||||
|
if (use_collision && is_root_shape() && root_collision_instance.is_valid()) {
|
||||||
|
PhysicsServer3D::get_singleton()->body_set_state(root_collision_instance, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) {
|
if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) {
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parent->_make_dirty();
|
parent->_make_dirty();
|
||||||
|
|||||||
Reference in New Issue
Block a user