Hello everyone,
I am attempting to make a breakout style game, I’ve just run into one little problem. I am trying to determine if the ball has hit a brick on the left or right side. Anyone have any ideas?
Hello everyone,
I am attempting to make a breakout style game, I’ve just run into one little problem. I am trying to determine if the ball has hit a brick on the left or right side. Anyone have any ideas?
you know where the ball is, and you should be able to work out a relative position/angle of the collision point from the ContactPoint doohicky
take a dot product of the normalized vector (contactPoint.position-brick.position) with your right vector. if the result is positive, it’s on the right, if negative, on the left