I am trying to figure out how to allow for a moving object to hit another stationary object and cause the stationary object to move in the same direction as the object that hit it. Kind of like a moving car ramming the back of a parked one. My current code is not working very well. When the object hits the other object, the object moves slightly to the right. Any ideas would be helpful.
private void checkDribble()
{
Player1 a = (Player1) getOneIntersectingObject(Player1.class);
if(a != null)
{
move();
}
}
