Box2D is an open-source rigid-body 2D physics simulation library for games, written in C++.

learn more… | top users | synonyms

-1
votes
0answers
28 views

Rotating body around a point Box2D Cocos2d

I have a problem when rotating a triangular image like a radar detecting enemies. b2Body *body; CCSprite *actor; if (b->GetType() == b2_kinematicBody && myActor == [loader ...
0
votes
0answers
22 views

Catching an object from sky in Cocos2d and Box2d world

My world has a gravity of -9.8 and there are KDynamicBodyType bodies falling from the sky. At the bottom there is a PhysicsSprite with KinematicBodyType. I want the PhysicsSprite to be able to catch ...
0
votes
1answer
80 views

Is there a “box2d without physics” lib (only for collision detection)?

Box2d Collision detection algorithms are probably the best ones out there. Unfortunately, they are bundled together with a realistic physics engine that I don't need. Is there an open source project ...
-8
votes
0answers
94 views

How can i detect collision using tilemap in libgdx? [closed]

I am trying to detect collision between actor and object but facing problem. If anybody having code of collision detection of tilemap than please post.
2
votes
1answer
50 views

Bodies do not stay sticked together by joint in retina display

I'm rehearsing on Box2D revolute joints. Everything's going pretty well except for one thing. For some reason bodies joined together with revolute joints do not stay sticked, they start getting apart ...
3
votes
1answer
43 views

How do I copy box2d data from one body to another?

I want to copy all Box2D-related data (position, velocity, rotation, impulse, ...) from one body to another. This is what I've got working (with box2djsweb): var t = body.GetTransform(); ...
-1
votes
1answer
103 views

Why might a body suddenly stop while moving on continue platform?

I have a 32x32 sprite and I make some to be platform like this for (int i = 0; i < 15; i++) { attachChild(new Ground(32 * i, 200, regPlatform, vertexBufferObjectManager, physicsWorld)); } ...
1
vote
1answer
101 views

Is using Box2D for simulating gravity “in space” a good idea? [duplicate]

I'm attempting to write a simulation of a solar system of planets in 2D space that are attracted to each other through Newton's law of universal gravitation. I know that it is possible to simulate ...
0
votes
0answers
37 views

Cocos2d/Box2d Component based entity system

Recently I've read somewhere that it is not a good idea to inherit from CCSprite class when making your game objects. In my CBES each Game Object has : -PhysicsComponent(responsible for updating ...
0
votes
0answers
78 views

Slow Rope Joint Simulation

I am right now developing game similar to Cut The Rope. But I have some problem in developing this game. I have successfully created rope and attached multiple rope with candy. Below I represent ...
-1
votes
0answers
25 views

How to simulate a thread/rope in Box2D? [duplicate]

I am trying to simulate a pendulum in Box2D. Instead of the normal joint I want to have a rope/thread joining the sphere with the joint. The main aim is that the rope should detect collision and act ...
-1
votes
0answers
39 views

Farseer 3.3 performance on Xbox [closed]

I am currently working on a simple 2d top-down game with XNA 4.0 for Xbox. I just included Farseer 3.3 to handle the physics. I have a big open space where the player can move freely and draw shapes ...
1
vote
0answers
71 views

Box2D, OpenGL, resolution and matrix setup

Okay, my internal units are going to be meters, ranging between 0.1 and 10 meters for size. First of all, my mind is all wrapped up in a knot trying to understand how to handle my game with multiple ...
0
votes
0answers
60 views

Help with ball movement and rotation in Box2d [closed]

I am trying to learn box2d in cocos2d. I have searched for online tutorials and ray Wenderlich's seem to be the best ones!I am learning in a slow but steady pace! I am currently developing an app in ...
0
votes
1answer
43 views

Box2D OpenGL debug renderer convert box2d coordinates to world space

I made an OpenGL 3.x renderer for Box2D's debug draw (b2Draw base class). Unfortunately I've tried for a while now to convert the box2D units, which are meters to my internal units which are pixels. I ...

1 2 3 4 5 21
15 30 50 per page