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 » Scripting Helpers
Home Search
 

Script that calculates perimeters of a model?

Previous Thread :: Next Thread 
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:22 AM
Can't find one, hoping someone can link me to a script that does this.
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
20 Aug 2012 09:28 AM
I've never seen such a model.
But while you're waiting, help me with my script?
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:44 AM
Uh why?
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
20 Aug 2012 09:45 AM
Its on this forums, nobody understands Explosion.Hit and I thought you might
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
20 Aug 2012 09:46 AM
Well, to get the perimeter of the bounding box of it is quite simple.

But to get the exact perimeter...gotta get creative with the scripting. I'm sure there's a way to do it, but I wouldn't be able to. Probably a few people who could do it though.
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
20 Aug 2012 09:46 AM
^^^ Words of Wisdom ^^^
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:48 AM
MrChickens, you're no help. Please leave this thread.
Report Abuse
Destroshun is not online. Destroshun
Joined: 12 Aug 2012
Total Posts: 764
20 Aug 2012 09:48 AM
^^^ Words of Wisdom ^^^


† KMXD 2.0 †
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
20 Aug 2012 09:48 AM
For instance, getting the bounding box perimeter around the horizontal line would look like:

local model = MODEL_PATH_HERE
local size = model:GetModelSize()

local horizPerimeter = (size.x*2) + (size.z*2)
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:49 AM
Wait, :GetModelSize() is a stock function? It's not on the wiki, but if it works, that's exactly what I need.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
20 Aug 2012 09:50 AM
Aye, look in the Object Browser :)

There's also GetModelCFrame()
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:51 AM
OK, GetModelSize() solves this problem. Thanks for the quick help.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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