1
\$\begingroup\$

Im currently using the Andengine GLES20 branch. I know that the new Box2D method setGravity() isn't implemented yet.

Has anyone managed yet to get it to work with Andengine or to write a method which does the same? I really need this new feature of Box2D.

Thank you in advance.

\$\endgroup\$
1
\$\begingroup\$

get latest source : https://github.com/nicolasgramlich/AndEngine

It has the method

mPhysicsWorld = new PhysicsWorld(new Vector2(0, 0), false);
mPhysicsWorld.setGravity(pGravity);

where pGravity is Vector2 object for x and y values for your gravity. like Vector2(0,5).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.