Merge pull request #62389 from TokageItLab/fix-set-position-in-node3d

Fixed `set_position()` in Node3D
This commit is contained in:
Rémi Verschelde 2022-06-25 01:24:16 +02:00 committed by GitHub
commit 90f6318af3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -324,7 +324,7 @@ Transform3D Node3D::get_relative_transform(const Node *p_parent) const {
}
void Node3D::set_position(const Vector3 &p_position) {
get_transform().origin = p_position;
data.local_transform.origin = p_position;
_propagate_transform_changed(this);
if (data.notify_local_transform) {
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);