0
votes
0answers
15 views

GWT problem with Box2D WheelJoint

I am using the below libgdx java code for a wheel joint and rear axle using Box2D. This works fine for android, Desktop, but when I attempt to run through GWT I get the following error. at ...
0
votes
0answers
7 views

Can't find PolygonDef in JBox2D [duplicate]

I was just following along with a tutorial on youtube and suddenly I couldn't import something named PolygonDef, just something named PolygonShape. I tried to finish the tutorial with the PolygonShape ...
2
votes
0answers
102 views

JBox2D Polygon Collisions Acting Strange

I have been playing around with JBox2D and Slick2D and made a little demo with a ground object, a box object, and two different polygons. The problem I am facing is that the collision-detection for ...
5
votes
1answer
231 views

2D Polygon Triangulation

I am creating a game engine using the JBox2D physics engine. It only allows you to create polygon fixtures up to 8 vertices, To create a body with more than 8 vertices, you need to create multiple ...
1
vote
1answer
51 views

Which .jar has JBox2d's p5 package?

Using Eclipse, I'm trying to write a simple hello world program in processing that simply draws a rectangle on the screen then has gravity drop it as seen in this tutorial. The problem is that when ...
1
vote
1answer
119 views

How do I use ContactListener in JBOX2D?

I have a character, and I need to know when he's touching a wall/floor. I look for some information but no luck. How do I do that? I saw a few things about ContactListeners and getContactList(). But I ...
2
votes
1answer
217 views

Camera scrolling and game boundaries

I am making a platformer game in JBox2D and LWJGL that has a scrolling camera, but I have hit a wall with the boundaries of the camera. Essentially what I have right now is a Box2D world that is ...
0
votes
1answer
392 views

Box2D and Slick2D: Graphics bug [closed]

The bug The physics ground represented by a horizontal line. The object is stationary, and seems to be pretending that the ground is lower. This is because the center of the Shape is incorrectly ...
1
vote
2answers
1k views

Applying Forces to Box2D Bodies

In full disclosure, I am VERY new to box2D let alone the Java version of it. I have a box (here of type Hero) that I am trying to move. I did this by trying to apply a force as follows... private ...
1
vote
1answer
154 views

OutOfBounds Exception when creating a PolygonShape using jbox2d

So here's the deal, i'm parsing a file that contains the vertices for a polygon, that i want to create in box2d. I create a new PolygonShape() and then call .set() giving it a defined array of Vec, ...
0
votes
1answer
375 views

JBox2D - how to get vertex positions?

I've created a triangle for jbox2d... public void createTri(){ PolygonDef shape = new PolygonDef(); shape.density = 2.0f; shape.friction = 0.8f; shape.restitution = 0.3f; ...
3
votes
3answers
515 views

Why does creating dynamic bodies in JBox2D freeze my app?

My game hangs/freezes when I create dynamic bullet objects with Box2D and I don't know why. I am making a game where the main character can shoot bullets by the user tapping on the screen. Each touch ...