Is this a valid way of padding? Why not this?

image

I see that Rick decided to have the padding float add or subtract to the mins and max’s and it definitely works differently but with mine I just replaced the X and Y values with padding and I was able to adjust the serialized field in Unity so that the player would hit the exact ends of the bounderies without exceeding them.

I assume the same can be done with Rick’s version but still

Is there a reason why we should do it the Rick way or is this one of those preferential things?

One reason to keep it separate would be maybe you want to use those min and max values to calculate something else later, in which case you’d probably want it without the padding coded in. But for the scope of this tutorial it’s probably not a big deal!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms