generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Region3, Y U NO have properties for the two vectors passed to the constructor?

Previous Thread :: Next Thread 
sncplay42 is not online. sncplay42
Joined: 27 Nov 2008
Total Posts: 11891
30 Oct 2011 12:36 PM
Seriously, why :(
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
30 Oct 2011 12:37 PM
I'm guessing they just forgot about it...
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
30 Oct 2011 12:39 PM
umad
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
30 Oct 2011 12:40 PM
no, he sad
Report Abuse
sncplay42 is not online. sncplay42
Joined: 27 Nov 2008
Total Posts: 11891
30 Oct 2011 12:49 PM
Now I remember why I was using those tables to represent regions.

Time to switch back to them
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
30 Oct 2011 01:00 PM
rule 1 of roblox

never trust anything they make
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
30 Oct 2011 01:23 PM
But it is pretty easy to get the two vectors D:

function GetVectors(Rg3)
  local x, y, z = Rg3.Size
  return Rg3.CFrame.p - Vector3.new(x/2, y/2, z/2), Rg3.CFrame.p + Vector3.new(x/2, y/2, z/2)
end


min, max = GetVectors(Region3.new(Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)))
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
30 Oct 2011 01:25 PM
There, I fixed it:

    local oldRegion3 = Region3
    Region3 = {}
    Region3.new = function(corner1, corner2)
        local min = Vector3.new(
            math.min(corner1.X, corner2.X),
            math.min(corner1.Y, corner2.Y),
            math.min(corner1.Z, corner2.Z)
        )
        local max = Vector3.new(
            math.max(corner1.X, corner2.X),
            math.max(corner1.Y, corner2.Y),
            math.max(corner1.Z, corner2.Z)
        )
        return setmetatable({
            From = min, To = max
        }, {
            __index = oldRegion3.new(From, To)
        })
    end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image