- Home /
Found The Soulution
Screen Resolution
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.
https://answers.unity.com/storage/temp/175523-06022021-225400-rec.png https://answers.unity.com/storage/temp/175524-06022021-225423-rec.png
Answer by itachi_10 · Feb 06, 2021 at 06:13 PM
Did 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 : $$anonymous$$onoBehaviour
{
public Joystick joystick;
public Rigidbody2D rb;
public float speed;
public void FixedUpdate()
{
rb.velocity = new Vector3(joystick.Horizontal * speed *
Time.fixedDeltaTime, rb.velocity.y);
}
}
Okay i found a solution i will use ui elements for the whole game and levels. However thank you for your time @itachi_10.
Hey @eraban if you still need help with that, let us know but using UI for everything is not recommended at all.