r/Unity2D•
TarrotIX

Please, help me control my ball speed.

Question

Noob here. I am trying to make a game similar to pong. Balls will spawn one after another with slightly increasing speed. My issue is for some reason I don't seem to be able to control the speed my balls travel. I have an image of my code for ball one and ball two side by side. The only difference between the code is I set the base speed for the first ball to 300, the base speed of the second ball at 15, and the second ball is moving at a diagonal. No matter what value I set these to the balls move at the same speed. Can anyone tell me why, and how to fix it?

https://preview.redd.it/l3x76cap7uxb1.png?width=1801&format=png&auto=webp&s=a0c2e617ecdbaffd22bde210c5ccea58a79b31a6

https://preview.redd.it/4xipgaod8uxb1.png?width=847&format=png&auto=webp&s=6504c973007aa294d73e1bc3f03d9503141057fe

Posted Nov 2, 2023, 1:31 AM UTC

13
Loading comments…