Player in Middle Rest moves |Problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Player in Middle Rest moves |Problem

In this Game (unfinished): https://code.sololearn.com/WM73JRQUaIBN/?ref=app The players x and y are changed but the screen shows him always in the center and the rest (brown blocks) move. The problem I have is when the player moves against a block (the player needs to be in the red/orange mode or he'll just destroy the block in front) the blocks move too even though the player moving and the blocks drawing is handled separately. It's like that's not the case and half the blocks move a bit and the other behave the right way. Can someone please help me? Nothing seems to work. Controls for game: Touch left side of canvas: player moves left Middle: jump

11th Oct 2018, 4:35 PM
Anton Böhler
Anton Böhler - avatar
1 Answer
0
found the problem: I calculatet the hitbox then drew the block for every block, so some blocks were drawn with the player inside an other block and the rest were drawn correctly. 😅
12th Oct 2018, 11:48 AM
Anton Böhler
Anton Böhler - avatar