17-08-2020, 09:11 AM
(This post was last modified: 17-08-2020, 09:13 AM by josemendez.)
(17-08-2020, 09:04 AM)virtushda Wrote: Damn.
Are there any plans to add non-uniform scaling support to SDF colliders?
Thanks either way!
It's a shame, but non-uniform scaling won't ever work with distance fields due to their very nature: they precalculate the distance between all points in the bounding box of an object, and the surface of an object. Essentially, the length of a lot of lines.
So imagine a line of length 10: if you scale the line uniformly in all axes by 50%, it's safe to say its length is also scaled by 50%: 5 instead of 10.
However, if you scale the line 50% in one axis, but only 25% in the other two axes, the above no longer holds true: there's no clear way to determine what the line length is, except for re-calculating it from scratch which completely defeats the purpose of distance fields.
![Indeciso Indeciso](https://obi.virtualmethodstudio.com/forum/images/smilies/undecided.png)