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

Previous Thread :: Next Thread 
Davidii is not online. Davidii
Joined: 17 Jul 2008
Total Posts: 1282
29 May 2009 09:04 AM
Ok. Assuming this diagram:

Sun
[||||]
[||||]-----------------------[] Planet
[||||]

Would this work to return a CFrame 90 degrees positive to the direction between the Planet and the Sun?

while true do

local current_cframe = CFrame.new(Sun.Position - Planet.Position)

local rotation_cframe = CFrame.fromAxisAngle(Vector3.new(0, 1, 0), math.pi/2)

local final_cframe = current_cframe * rotation_cframe --This should be the unit between
--The sun and the planet + 90 degrees

wait()

end
Report Abuse
Davidii is not online. Davidii
Joined: 17 Jul 2008
Total Posts: 1282
29 May 2009 09:05 AM
I need to know this because I'm trying to make centripetal motion around the sun to simulate a solar system.
Report Abuse
fuggles is not online. fuggles
Joined: 01 Mar 2008
Total Posts: 13937
29 May 2009 11:19 AM
I'm confused, what do want? Because you can use atan2(p1, p2) to get the angle of 2 positions if thats what you're wanting.
Report Abuse
Davidii is not online. Davidii
Joined: 17 Jul 2008
Total Posts: 1282
29 May 2009 12:22 PM
I want to get an angle, add 90 degrees to it to get a perpindicular line. Ok?
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
29 May 2009 02:29 PM
Hrmm... you could use cos and sin to move the planet around in a circle. I wouldn't know how to use a getEulerAngles function, but I should try to make one. =P

I already have plans to make it.
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
11 Jul 2014 11:23 PM
I never knew blobbyblob couldn't script. Interesting.
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
12 Jul 2014 06:51 AM
ow.

right in the feels.
Report Abuse
coolsamoXD1234 is not online. coolsamoXD1234
Joined: 30 Sep 2012
Total Posts: 47
12 Jul 2014 08:36 AM
Why don't you just take the X axis from the sun, the Y from the planet, ignore the Z, and merge it all into one CFrame value?
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
12 Jul 2014 04:01 PM
u necro u
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
12 Jul 2014 05:00 PM
When did booing become such a bad troll lol.

@blobbyblob

OMG I used to worship you lol
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
12 Jul 2014 05:33 PM
aboy:
I'm a bad troll? Really? After everything I've taught, you still continue to try to diss me? Pathetic. I'm leaving this forum forever.
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
12 Jul 2014 05:34 PM
booing come bak :(
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
12 Jul 2014 05:37 PM
i dont really care if he trolls its just annoying cuz sometimes its like *futurama meme* "cant tell if trolling....or just stupid"
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
12 Jul 2014 05:53 PM
Lol yeah this is trolling. "After everything I've taught..." yeah like the fact that instead of making arguments you can show people how they were in the past. Because that's typically how I judge others in a skill, not how they currently are at it.
Report Abuse
misgav11 is not online. misgav11
Joined: 21 Apr 2011
Total Posts: 3418
12 Jul 2014 08:28 PM
if you want an angle then use tan(rise/run)?

math.atan((Sun.Position.Y-Planet.Position.X)/(Sun.Position.X-Planet.Position.X)) + math.pi/2
Report Abuse
misgav11 is not online. misgav11
Joined: 21 Apr 2011
Total Posts: 3418
12 Jul 2014 08:28 PM
mini mistake :c

math.atan((Sun.Position.Y-Planet.Position.Y)/(Sun.Position.X-Planet.Position.X)) + math.pi/2
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jul 2014 10:10 AM
Why're you trying to help him when this thread is over five years old?
Report Abuse
misgav11 is not online. misgav11
Joined: 21 Apr 2011
Total Posts: 3418
13 Jul 2014 06:12 PM
WUT LOL, I JUST REALIZED. WHO THE FREAK BUMPED THIS?
Report Abuse
Xeptix is not online. Xeptix
Joined: 14 Mar 2013
Total Posts: 1115
13 Jul 2014 06:45 PM
well you should also "just realize" that there was MULTIPLE replies about how booing necro bumped this...

you need to use your eyes mr. sir
Report Abuse
etho77 is not online. etho77
Joined: 19 May 2012
Total Posts: 430
13 Jul 2014 08:01 PM
Hmm trying to figure out seems confusing but I get the idea...
Report Abuse
soultaker435 is not online. soultaker435
Joined: 11 Apr 2009
Total Posts: 261
13 Jul 2014 09:42 PM
--[[This is how
you pull off a multi-line text]]--
Report Abuse
soultaker435 is not online. soultaker435
Joined: 11 Apr 2009
Total Posts: 261
13 Jul 2014 09:44 PM
"""Or if you are using python,
simply use 3 apostrophes for the multi-line text"""
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jul 2014 09:52 PM
Who're you even talking to?
Report Abuse
soultaker435 is not online. soultaker435
Joined: 11 Apr 2009
Total Posts: 261
13 Jul 2014 09:56 PM
Davidii. Doesn't know how to use multi-line in LUA.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jul 2014 10:13 PM
.-.
This post is from 2009 and he isn't trying to make multiple lines of text.
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