Store and keep track of colliders x,y - windfield
Posted: Thu Jan 27, 2022 3:31 pm
Hello guys,
I started learning lua and love2d this month. In my little game you can controll a character on the left hand side of the screen and move him up and down. Arrows spawn randomly on the right side and fly towards the player.
My problem is i dont know how to create independent colliders and keep track of the x and y coordinates. The script creates one collider and if a second one would spawn it crashes because i think it uses the same colider for the next arrow.
I tried almost 6 hours to get the result that i have now and dont know hot to solve this problem. Ive tried but not succeded.
I searched on forums, read the windfield github manuel, tried a lot, but nothing worked.
File is attached. Thank you!
I started learning lua and love2d this month. In my little game you can controll a character on the left hand side of the screen and move him up and down. Arrows spawn randomly on the right side and fly towards the player.
My problem is i dont know how to create independent colliders and keep track of the x and y coordinates. The script creates one collider and if a second one would spawn it crashes because i think it uses the same colider for the next arrow.
I tried almost 6 hours to get the result that i have now and dont know hot to solve this problem. Ive tried but not succeded.
I searched on forums, read the windfield github manuel, tried a lot, but nothing worked.
File is attached. Thank you!