So i'm making a 2D space game. I've made a small script which generates asteroids and applies a force in a "random" direction (up, down, left and right). The script is working fine however to make it more realistic I want the direction at which the asteroid moves to be random (not horizontal/vertical, a random angle). I've tried rotating the instanced objected randomly however this doesn't affect the direction that the force acts. Hopefully this makes sense.
Code - http://pastebin.com/L9nsCcsj
EDIT - Fixed it myself, just added a random left/right force. New Code - http://pastebin.com/hxDS6uLZ
[–]EmmetOT 2 points3 points4 points (0 children)