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: Coordinates

Previous Thread :: Next Thread 
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
02 Jun 2015 10:40 PM
What coordinates would the exact middle of the screen be (x and y coordinates) for a button if the parent has position of {0.025, 0},{0.05, 0} and a size of {0.95, 0},{0.9, 0}





"There's candy in the white van kids!"
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
02 Jun 2015 10:45 PM
{(1-x_size)/2,0,(1-y_size)/2,0}
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
02 Jun 2015 10:55 PM
What.
Report Abuse
gergy008 is not online. gergy008
Joined: 16 Mar 2008
Total Posts: 7039
02 Jun 2015 11:00 PM
@TheBlueRivers

You've got to remember not everyone has the same screen resolution. Some screens are wider, some are taller. Some have more pixels etc.

The thing that CrowClaws did is get the size of the thing you wanted centering and center it based on the screen size.
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
03 Jun 2015 08:57 AM
Still dont get e.e



"There's candy in the white van kids!"
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Jun 2015 09:34 AM
first of all, the screen for the object IS the parent object itself and therefore it's size, and the position of the parent doesn't matter either since the parent object is it's canvas. the top left of the parent object is 0,0 and the bottom right of the parent object is 1,1.

therefore, only the actual size of the button itself matters.

which always is size / 2. so pos X for button is Size X / 2 and pos y is Size y / 2 .

this is the best i can explain, hope you understand now.



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