of     1   

Ferretguy
#46205978Tuesday, April 26, 2011 4:39 AM GMT

I want to find the X, Y, and Z position "boundries" of a part within a library, to compare to a player, so events can be triggered when these boundries are left. If the part has not been rotated, this is easy enough (Position.Axis - Size.Axis/2 or Position.Axis + Size.Axis/2 for minimums and maximums). I understand it would probably be lookVector used in this. But I have no idea where to start. Anybody have an idea?
Miksterman
#46206039Tuesday, April 26, 2011 4:42 AM GMT

You mean so you can detect when something is in or out of a specified bounding box? If so... Use this information: http://wiki.roblox.com/index.php/Region3 Here: http://wiki.roblox.com/index.php/FindPartsInRegion3 Otherwise could you explain a bit more...
Miksterman
#46206059Tuesday, April 26, 2011 4:43 AM GMT

After re-reading your post, I realised I gave a wrong solution...
Fungalmungal
#46206111Tuesday, April 26, 2011 4:45 AM GMT

Take the lowest and highest x, y, and z values of each of the part's corners.
Ferretguy
#46206171Tuesday, April 26, 2011 4:48 AM GMT

"Take the lowest and highest x, y, and z values of each of the part's corners. " I understand that. Hence paragraph 2 (If you want to call it a paragraph) The problem is if the object is tilted, thats not reflected in size or in position and it screws with the calculation.
Fungalmungal
#46206439Tuesday, April 26, 2011 5:02 AM GMT

The position of the corners are at Part.CFrame * Vector3.new(Part.Size.x, Part.Size.y, Part.Size.z), where the components of the vector3 are positive or negative depending on the particular corner.
Ferretguy
#46206802Tuesday, April 26, 2011 5:25 AM GMT

Ah ok. Thank you!

    of     1