Possible bug in Box.Expand()
BoldInventions 05 Dec 2009 21:45
I am still very much a noobie, but it looks to me like sideLengths is getting doubled in size and then 2*amount added, because '+=' is used, and then sideLengths is added again.
@@/ <summary>
/ Expands box by amount on each side (in both +ve and -ve directions)
/ </summary>
/ <param name="amount"></param>
public void Expand(Vector3 amount)
{
transform.Position -= Vector3.Transform(amount, transform.Orientation);
sideLengths += sideLengths + 2.0f * amount;
}@@
-Kevin