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

A few questions about Region3?

Asked by 5 years ago

I just discovered Region3 exists and I think I it's important since I've been using the .Touched event from Parts to define a "region". I can't find much info in roblox docs so here are a few questions:

1) What "shape" is this region? A block? A sphere?

2) If it is a block can I make a region3 sphere?

3) What is min and max in Region3.new( Vector3 min, Vector3 max ) <- taken from https://developer.roblox.com/api-reference/datatype/Region3

4) How often is this used in a game? (because I haven't used it at all)

0
1) Rectangular Prism. 2) Create a fake sphere that fits inside the region and do some checks to see if the player inside the region is inside the fake sphere using magnitude. 3) min is the lower corner extent, max is the upper corner extent. 4) I can't think of any cases I've seen it used but that doesn't mean you shouldn't use it. EpicMetatableMoment 1444 — 5y
0
for 2) is that a yes or a no? GoldAngelInDisguise 297 — 5y
0
no, they're squares Gey4Jesus69 2705 — 5y
0
Region3's are usually used in generating fake terrain SteamG00B 1633 — 5y
0
Ok thanks for all the help GoldAngelInDisguise 297 — 5y

1 answer

Log in to vote
0
Answered by
clc02 553 Moderation Voter
5 years ago
  1. A region is a box, as defined by two opposite corners. Imagine how you can click and drag to create a selection box on your desktop, only in three dimensions.

  2. You cannot, however if you find all objects in a region 3, you can use (center.Position - part.Position).Magnitude <= radius to see if it would be in a sphere from the center.

  3. Min and max are the start and end positions of the box, two opposite corners, there's no limit in reasonable use.

  4. It's used in terrain, and for finding parts in an area, but you can do a whole lot without ever touching it.

Ad

Answer this question