Path-Creator icon indicating copy to clipboard operation
Path-Creator copied to clipboard

Scaling in editor scales every axis, even if only one changed

Open alec-netsphere opened this issue 5 years ago • 3 comments

Using 1.2 from GitHub.

Replication: create a path, scale it in either x, y or z using either the Transform component or tool, and observe that the whole path scales in the scene (x AND y AND z) even if only one of those axis is scaled in the transform.

The video shows this working as intended, where the path will stretch in the given axis (only) rather than scaling the whole thing.

alec-netsphere avatar Sep 19 '19 19:09 alec-netsphere

This is using Unity 2019.2.4f1.

alec-netsphere avatar Sep 19 '19 19:09 alec-netsphere

The last commit where this worked correctly is 38a8b99 "Removed unused vars". It is broken in the next commit, dcac918 "Use pathcreator object's transform to move/rot/scale path (not fully tested yet)" and never works thereafter.

I doubt this was intentional, as if I wanted to scale the entire path, I'd scale x, y and z, rather than expect it to scale in every direction when one axis is scaled.

alec-netsphere avatar Sep 20 '19 16:09 alec-netsphere

May be because of this line?

https://github.com/SebLague/Path-Creator/blob/b7d1fa8b71ccaae8aaebeacd1b91b78b89d56dfd/Path%20Creator%20Project/Assets/PathCreator/Core/Runtime/Utility/MathUtility.cs#L20

mauricioeguia avatar Oct 29 '19 01:10 mauricioeguia