What steps will reproduce the problem?
1. Run Testbed
2. Switch to "Dynamic Tree" test
3. Press 'a' to start automatic mode
4. Notice raycast not working as intended
What is the expected output? What do you see instead?
Raycast test is not working as intended - hit is only reported if it happen
closer to start point then last hit.
What version of the product are you using? On what operating system?
Replicable on both "jbox2d-testbed-2.1.2-alpha-v2.jar" release from download or
latest version of SVN. System: Windows XP SP3, java 1.6.0_15.
Please provide any additional information below.
In class "org.jbox2d.testbed.tests.DynamicTreeTest" attribute
"m_rayCastInput.maxFraction" is being overwritten in "RayCast()" method:
- line 354:
RayCastInput input = m_rayCastInput;
- line 375:
input.maxFraction = output.fraction;
This result in "m_rayCastInput.maxFraction" becoming smaller over time and I
think this is not intended.
Fast fix is to create new RayCastInput object at line 354:
RayCastInput input = new RayCastInput();
input.set(m_rayCastInput);
Original issue reported on code.google.com by master.z...@gmail.com on 12 Jun 2011 at 1:46
Original issue reported on code.google.com by
master.z...@gmail.com
on 12 Jun 2011 at 1:46