Merge pull request #78439 from akien-mga/spatial-fix-overwriting-local-transform

Fix overwriting of Spatial's local transform
This commit is contained in:
Rémi Verschelde 2023-06-19 21:11:55 +02:00 committed by GitHub
commit cb6ec43a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,6 +274,7 @@ void Spatial::set_global_rotation(const Vector3 &p_euler_rad) {
void Spatial::set_transform(const Transform &p_transform) {
data.local_transform = p_transform;
data.dirty |= DIRTY_VECTORS;
data.dirty &= ~DIRTY_LOCAL;
_change_notify("translation");
_change_notify("rotation");
_change_notify("rotation_degrees");