Game Collision Detection Issue | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Game Collision Detection Issue

Hi, i am trying to build a Block Breaker game and am struggling with the collision behaviour of the blocks. the blocks are stored in an array. i give every array item a custom eventlistener and check for collision with the ball in the function "moveBall"; if a collision is detected, the event is dispatched and the block should be removed from the field. however, the block removed is always the last in the block array. if you dont move the panel and wait for about 10 sec, the ball reaches the second row and the behaviour is even stranger: now all the blocks from the array index of collision to the array length are removed; can anyone help me with my problem? thank you šŸ˜ƒ https://code.sololearn.com/WYY3u607E2f8/?ref=app

10th Sep 2019, 3:01 PM
Daniel Asherov
1 Resposta
+ 5
Daniel Asherov wait bro i will share your problem then you fix it your problem.. ok ā˜ŗā˜ŗā˜ŗšŸ‘šŸ‘šŸ‘ŒšŸ‘ŒšŸ‘Œ game is to good .šŸ‘šŸ‘šŸ‘
11th Sep 2019, 3:30 AM
šŸ‡®šŸ‡³Abhay Pratap SinghšŸ‡®šŸ‡³
šŸ‡®šŸ‡³Abhay Pratap SinghšŸ‡®šŸ‡³ - avatar