Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Confused with region3 Vectord3 Min and Vector3 Max?

Asked by
GxchaE 0
2 years ago

How does getting the min and max work for object I understand how to get it all that but.

I don't understand how doing script.Parent.Position - (script.Parent.Size/2) gets the min and doing script.Parent.Position + (script.Parent.Size/2) gets the max. If someone can please explain that would be nice I'm not that best at math.

1 answer

Log in to vote
1
Answered by
imKirda 4491 Moderation Voter Community Moderator
2 years ago
Edited 2 years ago

For Region3, minimum position should be bottom left corner and the maximum position should be upper right corner.

Since .Position is the middle position of the part, to get the lower left corner you need to subtract part's position with half of its size, for the upper right corner you need to add half of the part size to the position.

Here is image to demonstrate

Here is image to demonstrate from different view

Here is image to demonstrate from different view 2

Here is image to demonstrate from different view 3

Ad

Answer this question