Hi, excuse the noob question, but I’ve only been using unity and learning to dev for 3 weeks and its slow progress!
In C# I’m trying to make a basic pong clone to try and get my head around some basic physics and scripting - I’ve worked out the paddle movement fine and clamping, but I’m stuck on the ball movement and its driving me up the wall!
When I start the game, I want the ball to move from the centre at a random angle & fixed velocity towards one of the players at either end of the screen. It cant be that complicated, but I’m damned if I can find how to do it.
I understand how to use random.range to generate a random float or integer which I could use as a value for a random angle, but all I seem to be able to find are how to move an object to a specific point, moving between 2 points or moving left, right, up or down using transform.translate(vector3.right) etc…
Please can someone tell me how to do this so I can learn the correct way to do it, I’d be really grateful if you don’t just redirect me to the Unity reference guide on lerp or rotation etc… as i’ve looked at that a dozen times already and still can’t figure out how to achieve what I need!