Thank ya sir.
Printable View
Thank ya sir.
Sorry to dredge up an old thread, but is it possible to get the orbiting movement with Nifflas's example to work but starting at different points in the circle?
I don't want all the orbiting objects to start from the same position.
Thanks,
Tom / Doc4
Yes, just set the "rotation" alterable value to a random number when you create the object.
Well OBVIOUSLY that's the easy answer, Dynasoft. You'd have to be an idiot not to know that.
** smugly walks away until out of sight where he writes the answer down with excitement **
I have a ship fly towards a planet and, within a distance of 50, start to orbit. How can I set the ship's rotation start point based on where it is in reference to to planet?
I tried using Get Direction from the ADO, but it doesn't work as intended.
I want the ship to get within 50 and start orbit from that same spot.
Thanks,
Tom / Doc4
You need to get the angle from the planet to the craft. I think.
Does MMF have atan2 yet?
I've done ship to planet and planet to ship. It keeps putting the ship at unexpected locations.
Unfortunately my math skills do not extend beyond A+1=2. I had to copy and paste the Sin/Cos code from this thread to get things working to begin with.
Any suggestions?
Here are some screen shots if they are of any use.
http://img412.imageshack.us/my.php?image=radiushelpmh5.png
The formula isn't quite right, it should be the following to match MMF's angles:
[Always]
Set X Position of "Orbiter" to X( "Center of rotation" )+Cos(Rotation( "Orbiter" ))*Distance( "Orbiter" )
Set Y Position of "Orbiter" to Y( "Center of rotation" )-Sin(Rotation( "Orbiter" ))*Distance( "Orbiter" )
And initial rotation should be: (advanced direction object) longdir(planet x, planet y, ship x, ship y) with number of directions set to 360.
Works perfectly. Angles all line up.
The ship's captain would like to thank you for fixing the abrupt time/space leaping when he tried to orbit. He no longer needs a ship's chiropractor on staff.
Tom / Doc4