-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update_skew
to RemoteTransform2D
#103445
base: master
Are you sure you want to change the base?
Add update_skew
to RemoteTransform2D
#103445
Conversation
2c2d7a1
to
f231a11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f231a11
to
e51ea74
Compare
|
I just noticed that code for updating local and global transform looks the same. It could be moved to a method. |
Line 128 in 1753893
The effect of negative x scale on rotation should be eliminated when update remote scale is disabled. |
e51ea74
to
5dba27e
Compare
I don't think effect on the rotation can be negated reliably, so I added these notes to |
if (!update_remote_scale) { | ||
our_trans.set_scale(n_trans.get_scale()); | ||
} | ||
if (!update_remote_skew) { | ||
our_trans.set_skew(n_trans.get_skew()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the elapsed time of these methods: set_scale()
<< set_rotation_scale_and_skew()
< set_skew()
That is, if you don't just call set_scale()
, it is better to call set_rotation_scale_and_skew()
directly. You can single out the case where only set_scale()
is called.
Fixes #103368 by adding an
update_skew
property to theRemoteTransform2D
.