Hi I'm making a pool game and I need to know how to make balls bounce of of angled edges. My code for regular horizontal or vertical edges is just getMovement().revertVertical(), and getMovement().revertHorizontal(). but you know how in pool near the pockets the edge is angles right? Due to this the ball just bouncing as if hitting a normal horizontal or vertical wall rather than a diagonal one.
Actor h = (Actor)getOneIntersectingObject(HorizEdge.class);
Actor v = (Actor)getOneIntersectingObject(VertEdge.class);
if(h!=null){
getMovement().revertVertical();
}else
if(v!=null){
getMovement().revertHorizontal();
}
I need help please

