Answers for "Trigonometric functions"
http://answers.unity.com/questions/982074/trigonometric-functions.html
The latest answers for the question "Trigonometric functions"Answer by Dave-Carlile
http://answers.unity.com/answers/982111/view.html
How about using a [Quaternion.Slerp][1]? It takes `from rotation`, `to rotation` parameters, as well as `t` which you change from 0 to 1 over time. When `t` is 0 it returns `from rotation`, and when `t` is 1 it returns `to rotation`, and when `t` is in between it returns the appropriate value between `from` and `to`.
Your script would need to change `t` over time, and when it reaches 1 you would reverse the direction and move it back toward 0, and then reverse and back toward 1, and so on.
Once you have that set up, all you need to do for a random start position is to start `t` at a random value between 0 and 1. It would also be simple to have different swing speeds by varying how fast you modify `t`.
Edit: You could also use a tweening library from the asset store for changing the value of `t`, or mechanim, or it's fairly simple to handle yourself in `Update` or a Coroutine or something.
[1]: http://docs.unity3d.com/ScriptReference/Quaternion.Slerp.htmlSun, 07 Jun 2015 20:04:21 GMTDave-CarlileAnswer by NoseKills
http://answers.unity.com/answers/982107/view.html
If all else fails, I think you could run a random amount of Updates for each cage when they are created to "fast forward" their position to a random spot.Sun, 07 Jun 2015 19:55:46 GMTNoseKills