Skip to content
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

Continuation of #27562 #27577

Merged

Conversation

@guilhermefelipecgs
Copy link
Member

guilhermefelipecgs commented Apr 1, 2019

@akien-mga Sorry, I forgot these lines. Without this, the scale interpolation will still be broken.

Fix #27703
Bugsquad edit: Fixes #28004.

@Chaosus Chaosus added this to the 3.2 milestone Apr 2, 2019
@reduz

This comment has been minimized.

Copy link
Member

reduz commented Apr 4, 2019

I always wondered if the way of doing scale interpolation is right, I feel it should be converted to a different scale somehow to be interpolated properly.

@reduz

This comment has been minimized.

Copy link
Member

reduz commented Apr 4, 2019

By logic, for scale to be interpolated properly, it should be in log2 scale instead of substracted to -1 (which is a bad hack), but then if scale is negative, or is interpolated between positive and negative, it will break.
So, in ttruth, not quite sure what to do about this.

@reduz

This comment has been minimized.

Copy link
Member

reduz commented Apr 4, 2019

For AnimationTree, I feel there is not much of a point in interpolating from negative to positive (never really seen this use case), so maybe we should actually store a Vector3 scale in log2 and a separate Vector3 with the sign (by default Vector3(1,1,1)), what do you think?

@guilhermefelipecgs guilhermefelipecgs force-pushed the guilhermefelipecgs:continuation_of_27562 branch from 25fcac7 to ae8bf13 Apr 5, 2019
@guilhermefelipecgs

This comment has been minimized.

Copy link
Member Author

guilhermefelipecgs commented Apr 5, 2019

so maybe we should actually store a Vector3 scale in log2 and a separate Vector3 with the sign (by default Vector3(1,1,1)), what do you think?

I didn't understand why and how to use log2 for this, but anyway, I've removed the subtraction hack and it looks like it's working properly. I can scale from negative to positive using AnimaitonTree (even if it's not so useful) and I've tested TPS Demo as well.

I didn't see any problem the way it is so I guess we can keep it that way.

[AnimationTree] Fix scale interpolation
@guilhermefelipecgs guilhermefelipecgs force-pushed the guilhermefelipecgs:continuation_of_27562 branch from ae8bf13 to dbda5b6 Apr 5, 2019
@akien-mga akien-mga merged commit 36a54ff into godotengine:master Apr 21, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Apr 21, 2019

Thanks!

@guilhermefelipecgs guilhermefelipecgs deleted the guilhermefelipecgs:continuation_of_27562 branch Apr 21, 2019
@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Aug 21, 2019

Cherry-picked for 3.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.