As you can see in the second image that the balls are getting out of the screen. How can make them to remain consistent to the screen resolution but not only for the balls but also for the whole level except the borders.
1 Answer
1Did you put collider…show your script for moving the ball
What do you mean, collider on what? The code for moving the ball: public class Circle : MonoBehaviour { public Joystick joystick; public Rigidbody2D rb; public float speed; public void FixedUpdate() { rb.velocity = new Vector3(joystick.Horizontal * speed * Time.fixedDeltaTime, rb.velocity.y); } }
– erabanOkay i found a solution i will use ui elements for the whole game and levels. However thank you for your time @itachi_10.
– eraban