Questions tagged [box2d]
Box2D is an open-source rigid-body 2D physics simulation library for games, written in C++, with ports in various languages
812
questions
9
votes
1
answer
509
views
How can I copy or back-calculate definitions for an entire b2World?
I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, ...
9
votes
2
answers
5k
views
Box 2D Set Origin
I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example.
I've heard of ...
2
votes
1
answer
1k
views
cocos2d: syncing CCAnimation frames with Box2d Shape manipulations
my cocos2d game currently has a ccsprite attached to a box2d body.
during the game i apply different CCAnimations on my sprite, i would like to perform certain manipulations to the box2d body ...
4
votes
1
answer
953
views
Problem with box2d at beggining
I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end , ...
2
votes
2
answers
349
views
In Box2dFlash my b2body gets detached from my Sprite after I use setXForm()
I have a scenario where I have red coin in a Carrom board game which should be moved outside of the visible window when it is pocketed, also if any coin either white or black is not pocketed in the ...
6
votes
2
answers
2k
views
cocos2d Merging box2d bodies
i'm using cocos2d to build an iphone game.
my game currently has two sprites: one for the main character and another for an item i should carry once he gets on him.
the main character and the item ...
6
votes
3
answers
5k
views
Polygon/Shape definition changes in Box2D 2.1
I was going through a pretty good tutorial on Box2D here, but I ran into a problem when he made a b2PolygonDef, because the tutorials were made in 2.0, and I'm ...
76
votes
5
answers
44k
views
Good 2D Platformer Physics [closed]
I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to ...
8
votes
3
answers
2k
views
How do the Box2d and Bullet physics simulations work internally? [closed]
I've seen box2d and bullet ported into JavaScript, but neither of them attracted me, except for the source code. It all seemed quite simple, once I looked inside.
What are they doing within each of ...
11
votes
2
answers
11k
views
Using The Box2D Polygon "Set()" function?
I'm using the Box2D physics engine. And there's a type of shape for box2D called b2PolygonShape.
In this class, you can create polygons. There is also a Set() function that takes an array of points ...
10
votes
4
answers
10k
views
Box2D Check If Point Intersects a Body
Is there a way to check if a point is intersecting a body?
For example, lets say there's a body in the world at a position of (100,100).
Is there a way to check if a point at (100,100) intersects ...
12
votes
4
answers
10k
views
Box2D Get Bounding Box of a Body
In Box2D, I was curious if it's possible to get a bounding box of a body already created in the world.
So basically, the Body is created, it's interacting with the world and such. And I needed that ...