Hi all!
I'm making a Pong clone for learning purposes. I'm not using Unity's built-in Physics2D system, but I'm manually moving objects by changing their positions by a *speed* value multiplied by Time.deltaTime.
I'm having problems with checking for collisions between the Ball and the Bats. Currently I'm using Raycasting, with **Physics2D.Linecast(prevPos, newPos)** method, but this ignores Ball's Circle Collider and only detects collision at Ball Sprite's center (because it casts a line between the previous position of the ball and the new position).
How do I detect collision between a Circle Collider and a Box Collider 2D in a continuos way without using built-in physics?
Thank you in advance! :)
↧