mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 20:06:49 +01:00
Fix overwriting of Spatial's local transform
Modifies when 'DIRTY_LOCAL' flag is set to prevent a transform applied using `set_transform` to be overwritten by previous calls to change the node's rotation, translation or scale. Fixes #43130.
This commit is contained in:
parent
78bc0eeb97
commit
97dee88433
@ -264,6 +264,7 @@ void Spatial::set_global_rotation(const Vector3 &p_euler_rad) {
|
|||||||
void Spatial::set_transform(const Transform &p_transform) {
|
void Spatial::set_transform(const Transform &p_transform) {
|
||||||
data.local_transform = p_transform;
|
data.local_transform = p_transform;
|
||||||
data.dirty |= DIRTY_VECTORS;
|
data.dirty |= DIRTY_VECTORS;
|
||||||
|
data.dirty &= ~DIRTY_LOCAL;
|
||||||
_change_notify("translation");
|
_change_notify("translation");
|
||||||
_change_notify("rotation");
|
_change_notify("rotation");
|
||||||
_change_notify("rotation_degrees");
|
_change_notify("rotation_degrees");
|
||||||
|
Loading…
Reference in New Issue
Block a user