First time posting here. I've been looking over various bits of code from different tutorials out there and decided to make a simple pong game using libdgx. However, I ran into a problem when setting up collision detection. I tried searching around but I can't seem to find what I'm looking for (not sure what I would search for with my issue).
Anyway, sometimes when the ball collides with the player at a certain point, usually on the bottom part of the player, the ball will "slip through" the player rectangle and bounce inside of it until it gets to the end of the player. Then it slips out.
This is just what the game looks like.
And this is my issue.
Here's my code:http://pastebin.com/u/Collzi
If someone would just point me in the right direction or provide any help on this it would be greatly appreciated.
I'm a noob at this so if you guys have any tips on improving code or anything like that, that would be cool too!
EDIT: I'm an idiot. I'm not checking for a collision before I make a move... I think. I'll post an update once I work it out.