|
I'm trying to rotate an object around another object at a set angle.. code I have (non-working) is below :
oAngle is the angle I want, oSpeed just a number to easily regulate the speed that the object is moving. Is there a way to do this without a complex trig function?
(comments are locked)
|

you can copy the mouse orbit script in standard assets and replace the mouse input for your angle
I swapped out the 'Input.GetAxis("Mouse X") and "y" values with numbers but nothing seemed to happen when I attached the script to the object I want to move on the 45 degree angle.
got it working... I forgot to set the Transform Target for the script. Thanks for the help!
Thought I had it working, I didn't. Here's a link to my script. If someone could help me with this I would greatly appreciate it. All I need for variables is an orbit speed (already set) and the angle to orbit. http://www.epicarc.com/Orbit.js