- Home /
Question by
yunusemrebass · Mar 30, 2018 at 01:34 PM ·
backgroundsmoothscrollingobstacle
How can I make smooth scrolling background and obstacles ? Because my backgrounds and obstacles have shaking(vibration) when it play ?
I'm using boxcollider2d and rigidbody2d on my backgrounds and obstacles;
private Rigidbody2D rb2d;
void Start ()
{
rb2d = GetComponent<Rigidbody2D>();.
rb2d.velocity = new Vector2 (0,-GameControl.instance.scrollSpeed);
}
void Update()
{
if(GameControl.instance.gameOver == true)
{
rb2d.velocity = Vector2.zero;
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612155659im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to follow a game object by camera but with a slower speed? 2 Answers
scrooling background 0 Answers
2D Parallax Background 4 Answers
Moving Background with translated images 1 Answer
Making a point and click background. 0 Answers