+ 2

Canvas shivering šŸ„¶???[solved 1/2]

I coded my first canvas animationšŸ‘Øā€šŸ’» I randomised the spawn location of the ball in my code but when it spawns near the screens edges the ball starts vibratingšŸ„¶ and gets very slow ,why ?how can I fix this??šŸ¤”šŸ¤”šŸ¤” And please tell if I am doing anything wrong herešŸ„ŗšŸ¤Ŗ https://code.sololearn.com/Wpf1brzOWJdb/?ref=app

20th Oct 2020, 1:44 AM
Atoms~āš›
Atoms~āš› - avatar
2 Answers
+ 1
There should be can.height In the second if statement
20th Oct 2020, 1:48 AM
Shreyansh
Shreyansh - avatar
0
Shreyansh [ #yellove ] thanks for the help šŸ™‚ But still when its spawns near edges of the canvas it shivers Can u tell me how to fix it
20th Oct 2020, 2:04 AM
Atoms~āš›
Atoms~āš› - avatar