Region3: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>MrNicNac Edited a lot of wrong information and added some properties. |
>Anaminus fixing; expanding |
||
Line 1: | Line 1: | ||
A Region3 is used to represent a size and a location in 3D space. | |||
A Region3 | |||
A Region3 can be created with the '''Region3.new''' constructor, which receives two [[Vector3]] values: | |||
Region3.new( Vector3.new(1,1,1), Vector3.new(3,3,3) ) | |||
The first Vector3 represents the position of the smallest corner of the Region3, while the second represents the position of the largest corner. This example returns a Region3 with a size and position of (2, 2, 2). | |||
When printed, the Region3's [[CFrame]] and Size are displayed: | |||
2, 2, 2, 1, 0, 0, 0, 1, 0, 0, 0, 1; 2, 2, 2 | |||
==[[Constructors]]== | ==[[Constructors]]== | ||
Line 7: | Line 13: | ||
! Constructor !! Description | ! Constructor !! Description | ||
|- | |- | ||
| Region3.new(''' | | Region3.new('''Vector3''', '''Vector3''') || Creates a new Region3 out of two Vector3 values. | ||
|} | |} | ||
== Properties == | ==Properties== | ||
All the of a properties Region3 userdata are read-only and cannot be set or edited directly. You must create a new Region3 using Region3.new() to make the properties change. | All the of a properties Region3 userdata are read-only and cannot be set or edited directly. You must create a new Region3 using Region3.new() to make the properties change. | ||
{|border="1" cellspacing="5" | {|border="1" cellspacing="5" style=" -webkit-border-radius: 4px; -moz-border-radius: 4px; height: 100%; background-color: #FFFFFF; border-top: dashed 2px #ff0000; border-left: dashed 2px #ff0000; border-bottom: dashed 2px #aa0000; border-right: dashed 2px #aa0000; margin: 6px; margin-right: 10px; margin-left: 10px; clear: none; padding: 2px;" | ||
! Property !! Type !! Description | !Property !! Type !! Description | ||
|- | |- | ||
| Region3. | | Region3.CFrame || [[CFrame]] || The center location and rotation of the the Region3 | ||
|- | |- | ||
| Region3. | | Region3.Size || [[Vector3]] || The 3D size of the Region3 | ||
|} | |} | ||
==See Also== | |||
*[[FindPartsInRegion3]] |
Revision as of 18:11, 9 April 2011
A Region3 is used to represent a size and a location in 3D space.
A Region3 can be created with the Region3.new constructor, which receives two Vector3 values:
Region3.new( Vector3.new(1,1,1), Vector3.new(3,3,3) )
The first Vector3 represents the position of the smallest corner of the Region3, while the second represents the position of the largest corner. This example returns a Region3 with a size and position of (2, 2, 2).
When printed, the Region3's CFrame and Size are displayed:
2, 2, 2, 1, 0, 0, 0, 1, 0, 0, 0, 1; 2, 2, 2
Constructors
Constructor | Description |
---|---|
Region3.new(Vector3, Vector3) | Creates a new Region3 out of two Vector3 values. |
Properties
All the of a properties Region3 userdata are read-only and cannot be set or edited directly. You must create a new Region3 using Region3.new() to make the properties change.
Property | Type | Description |
---|---|---|
Region3.CFrame | CFrame | The center location and rotation of the the Region3 |
Region3.Size | Vector3 | The 3D size of the Region3 |