06-05-2022, 08:34 PM
(06-05-2022, 05:04 PM)_Aka_ Wrote: Let me know if this fixed your issue.
Have a nice day
Yes it did, although it needed a small modification. The rotation can produce a vector with negative components, which leads to bad behavior. Using the absolute values worked:
Code:
Vector3 vec = Quaternion.Euler(Rotate) * new Vector3(
rotationlessBoundsSize.x * Scale.x,
rotationlessBoundsSize.y * Scale.y,
rotationlessBoundsSize.z * Scale.z);
vec.x = Mathf.Abs(vec.x);
vec.y = Mathf.Abs(vec.y);
vec.z = Mathf.Abs(vec.z);
bounds.size = vec;
Thanks for the help.