mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
OrientedBounds cleanup
This commit is contained in:
parent
b72fcb07f0
commit
1f92797072
@ -58,9 +58,10 @@ namespace ConformalDecals {
|
||||
Vector3 unitZ = matrix.GetColumn(2);
|
||||
var scale = new Vector3(unitX.magnitude, unitY.magnitude, unitZ.magnitude);
|
||||
|
||||
_localBounds = new Bounds();
|
||||
_localBounds.center = matrix.MultiplyPoint3x4(aabb.center);
|
||||
_localBounds.extents = new Vector3(aabb.extents.x / scale.x, aabb.extents.y / scale.y, aabb.extents.z / scale.z);
|
||||
_localBounds = new Bounds {
|
||||
center = matrix.MultiplyPoint3x4(aabb.center),
|
||||
extents = new Vector3(aabb.extents.x / scale.x, aabb.extents.y / scale.y, aabb.extents.z / scale.z)
|
||||
};
|
||||
|
||||
OrientationMatrix = Matrix4x4.zero;
|
||||
UnitX = unitX / scale.x;
|
||||
|
Loading…
Reference in New Issue
Block a user