Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
3

A few questions about Region3?

Asked by 2 months 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. SinisterMemories 653 — 2mo
0
for 2) is that a yes or a no? GoldAngelInDisguise 238 — 2mo
0
no, they're squares gioni01 2015 — 2mo
0
Region3's are usually used in generating fake terrain SteamG0D 560 — 2mo
0
Ok thanks for all the help GoldAngelInDisguise 238 — 2mo

1 answer

Log in to vote
0
Answered by
clc02 548 Moderation Voter
2 months 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