Box2D 2.0.2 vs Flex SDK 3.0/3.1/3.2/3.3

Hi all,

I'm getting some peculiar difficulties getting my box2d (latest version) setup to work while compiling with different versions of the Flex SDK.

Currently the only Flex SDK to work with box2d for me is version 3.0. If I compile my work with another version like 3.3, I get no errors, but the simulation doesn't do anything either.

To clarify: I'm making a very simple setup with a board rotating around a hinge upon mouse interaction. The debugDrawer perfectly shows the mouseJoint working on the board, but there is no actual resulting movement using a SDK version greater than 3.0.

Is this a familiar issue? If helpful I can post some code for testing.

Cheers,

Erik
I've just run into this myself with the example codes.
The problem is here (in TestBed/Test.as:136) :
Code:
public var m_timeStep:Number = 1 / 30;

Apparently, this becomes zero (after I assume the flex compiler does its optimizing things).

Fix:
Code:
public var m_timeStep:Number = 1.0 / 30.0;

And it moves 🙂
That did the trick, thanks! 🙂

Strange though,

Code:
trace( 1 / 15 );
trace( 1.0 / 15 );
trace( 1.0 / 15.0 );


all return 0.06666666666666667.

Must be some wierd underbelly mechanic in the compiler
Yeah, it only happens at the member variable declarations, inside the functions it works fine.

Original thread: https://box2d.org/forum/viewtopic.php?t=3050