JBox2D is a java physics engine often used in games an other physics simulations, and is a port/extension of the C++ physics engine, Box2D.

learn more… | top users | synonyms

3
votes
1answer
106 views

In JBox2d when dragging a Body, why is the direction is flipped vertically?

Why is it when I drag a JBox2d Body with the mouse, the vertical component is flipped? e.g. If I drag down-right, the Body moves up-right. Is this expected behaviour, a bug in JBox2D, a Mac ...
2
votes
1answer
278 views

Rotating towards a point in Box2D

I'm using Box2d as my physics engine and I'm trying to solve what would normally be a simple problem but what has become a nightmare for me and preventing me from finishing my app. (6 months work) I'...
-1
votes
1answer
68 views

Collision problem JBox2D

I work with Processing and the JBox2D library and wanna code a new Ping Pong game. But if I move the player to the top border (or lower border), he collide on a wrong position. The picture shows ...
1
vote
0answers
17 views

Getting a TOISolver ArrayIndexOutOfBoundsException creating a tile based game

I've been making a tile-based game on java using jBox2D.For adding tiles to physical world I use static bodies which are stored in updating ArrayList(i use PhysicBlock class as a wrapper). Whenever I ...
1
vote
0answers
99 views

Mouse click coordinates not mapping to Box2d world

I'm using Box2d in Java with OpenGL, trying to detect if a mouse has clicked on a Body. But having trouble mapping mouse coordinates to Box2d world. I have a Body positioned at 20.0f, 30.0f in the ...
0
votes
0answers
40 views

Decrease force in a zero gravity world

I have a world with zero gravity. On a mouse pressed I apply a force so things drive away from the mouse. The problem is now that they keep on flying. How can i make them stop? box2d.world....
0
votes
0answers
32 views

JBox2D Collision Detection

how can i detect a collision between two fillOval with the physics engin?? i read the manual but i can't understand where i may write my code. i want to simulate the fall of 2 balls and catch the ...
0
votes
0answers
51 views

Simulate juggling : how throw and grab objects with JBOX2D

There is an object which simulates a ball and another which simulates a hand (square).I want to be able to catch the ball and throw it with a projection force with the hand on JBOX2D. Any sample code (...
0
votes
0answers
21 views

How can I avoid duplication of jBox2D physics attributes?

I'm using jBox2D for physics and collision detection in a game engine with an entity-component system. It works, but I'm unsure how to structure my code with respect to the values represented in the ...