mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 20:23:53 +00:00
Merge pull request #44640 from nekomatata/joint2d_update_body_transforms
Update body transforms on joint2D setup
This commit is contained in:
commit
7d972b8c67
@ -90,6 +90,14 @@ void Joint2D::_update_joint(bool p_only_free) {
|
||||
warning = String();
|
||||
update_configuration_warning();
|
||||
|
||||
if (body_a) {
|
||||
body_a->force_update_transform();
|
||||
}
|
||||
|
||||
if (body_b) {
|
||||
body_b->force_update_transform();
|
||||
}
|
||||
|
||||
joint = _configure_joint(body_a, body_b);
|
||||
|
||||
ERR_FAIL_COND_MSG(!joint.is_valid(), "Failed to configure the joint.");
|
||||
|
Loading…
Reference in New Issue
Block a user