Region3

From Legacy Roblox Wiki
Revision as of 18:11, 9 April 2011 by >Anaminus (fixing; expanding)
Jump to navigationJump to search

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

See Also