3
\$\begingroup\$

I'm using Box2D.

I think it's something to do with wall's fixture definition, but when a ball goes toward a wall at a 45 degree angle, I would expect it to bounce off at 135 degrees, but it always goes 90 degrees against wall. Why would this be?

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

I was setting a large restitution value (greater than 1), that caused the problem.

\$\endgroup\$
2
  • \$\begingroup\$ Even if it seems silly, you should mark this the answer to your problem. \$\endgroup\$ Commented Jan 16, 2012 at 3:44
  • 1
    \$\begingroup\$ @MindWorX I understand that but system does not allow me to do it until two days after writing the question. \$\endgroup\$ Commented Jan 16, 2012 at 4:37
3
\$\begingroup\$

I know this is an old question, but I've just come across this solution and found that making sure restitution is not above 1 is not enough. friction also caused differentiation in the angle of which it bounces off. so setting friction to 0 allowed me to bounce a ball up against a 45* wall and get the expected perpendicular reaction.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.