Commit graph

6 commits

Author SHA1 Message Date
4200a3e7df add enemy ai to the game
the enemy can now track the player with a cast that uses a shape generated in code. the enemy moves using some fancy math that gets the sign of the distance between the ball and the enemy paddles y position to get a normalised number for velocity and the velocity is lerped to smooth out any janky movement.
2023-05-17 23:41:40 -07:00
e50f0aefb1 add a random starting x direction to the ball
this means the ball can either go left or righ randomly instead of always going left.
2023-05-17 14:16:31 -07:00
133e0fb734 move the maxRandomAngle double to an exported var.
this means you can set the maxRandomAngle in the inspector, without having to modify the code.
2023-05-17 10:52:55 -07:00
4681c2e620 add randomness to the ball and make the paddle smaller. 2023-05-16 23:47:24 -07:00
02c5b90415 make a basic prototype for a scene.
right now theres just a moving ball, inside a box, with a working paddle. i had to make the ball kinematic and tell the ball to bounce when it hits the other direction.
2023-05-16 23:15:31 -07:00
794a3646ed Initial Commit 2023-05-16 20:28:26 -07:00