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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 11 Jul 2014 11:23 PM |
| I never knew blobbyblob couldn't script. Interesting. |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 13 Jul 2014 10:10 AM |
| Why're you trying to help him when this thread is over five years old? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 13 Jul 2014 09:42 PM |
--[[This is how you pull off a multi-line text]]-- |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2014 09:44 PM |
"""Or if you are using python, simply use 3 apostrophes for the multi-line text""" |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2014 09:52 PM |
| Who're you even talking to? |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2014 09:56 PM |
| Davidii. Doesn't know how to use multi-line in LUA. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2014 10:13 PM |
.-. This post is from 2009 and he isn't trying to make multiple lines of text. |
|
|
| Report Abuse |
|
|