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
 

Re: Rotating 2D

Previous Thread :: Next Thread 
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
11 Oct 2012 03:19 PM
Well, I'm trying to move a gui object radially, but unfortunately 0 is not centrally plotted... How would I go about moving a gui object around the center of something? The normal part rotate uses special CFrame, but that won't work for the style of guis.
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
11 Oct 2012 03:21 PM
GUI rotation is, at the moment, almost impossible. There's a nice little property or method coming soon which will allow you to easily rotate GUIs.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
11 Oct 2012 03:23 PM
There is an algorithm though :/ Used it on a 2D set the other day
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
11 Oct 2012 03:36 PM
Bmmp
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Oct 2012 03:42 PM
Add half the size of the screen to your 2D point and it should be fine.
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
11 Oct 2012 03:45 PM
According to a message I got from sorcus, they ran into issues and have stopped working on it for now D:

- I script and people liek it.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
11 Oct 2012 03:49 PM
@Ray. Duh. But how would the loop go without the use of radians?
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Oct 2012 04:10 PM
math.rad() converts degrees to radians and math.deg() converts radians to degrees.
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
11 Oct 2012 04:18 PM
On a 2D plane? My brick rotating uses:


——————————————————————————————————
p.CFrame = CFrame.new(0, 120, 0)
* CFrame.Angles(0, math.rad(angle), 0)
* CFrame.new(0, 0, dist)
——————————————————————————————————

How to convert this to 2D?
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
11 Oct 2012 07:23 PM
Get rid of the unused axis.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
11 Oct 2012 07:44 PM
Check out my compass.

http://www.roblox.com/Compass-item?id=58018327
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