I am making Pong.
When my ball hits a bat, it works perfectly, as long as the bat is not moving.
If the bat is moving though, the ball pushes the bat backwards.
I'm hoping someone can play the Beta of the game, see what I mean and offer some advice?
My Ball is a RidigBody2D with a CollissionShape2D as a child. As shown:
My Bat is a KinematicBody2D with a CollissionShape2D as a child. As shown:
The bat movement code is like so:
The game can be downloaded in Beta for:
Note I haven't tested the Windows build.
TIP: To really see it in action, make one player a CPU player. This is because I have the CPU adding a bit of "spin" to the ball by moving quickly at the last second, just before the ball hits the bat. That allows you to see the problem amplified as the bat is moving so quickly at this point.
Any help would be GREATLY appreciated.