Questions tagged [box2d-iphone]

Box2D is a physics engine created by Erin Catto. This tag is similar to the box2d tag in that it is more specifically aimed at iOS development.

Box2D is a physics engine that is particularly popular among Cocos2D developers when developing a game for iOS devices. It is fairly fast and easy to use. More information can be found on its official website:

Box2D.org

For more information on Cocos2D (iOS) see:

Cocos2D-iPhone.org

410 questions
3
votes
1 answer

Where can I find fixture presets of different materials?

Where can I find fixture presets, that can be used in rigid body physics engines, like Box2D to simulate the behaviour of different materials? I'm looking for values of density, friction and restitution for common materials like: Smooth/rough…
Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
3
votes
1 answer

Rope in cocos2d & box2d

all! I'm creating a game based on Box2d and Cocos2d. I want to make up a rope, which will be able to contact with all of the physical objects. Something like this: http://rghost.ru/35987917.view I created a rope by using a rectangles joined through…
Gralex
  • 4,285
  • 7
  • 26
  • 47
3
votes
2 answers

cocos2d setasedge issue

In cocos2d version v1.0.1 groundBox.SetAsEdge(left,right); It needs to not use the SetAsEdge as an error saying that the method doesn't exist, which makes sense as it was removed in a previous version However I'm unsure of how to do this…
Luke
  • 3,375
  • 2
  • 22
  • 22
3
votes
1 answer

Is there any way to draw the Concave Polygon in Box2D and detect the collision with other shapes

I am beginner in Box2D physics engine. As I am having a Image with irregular curves I am trying to develop the polygon. But with the reference of the Raywenderlich demo tutorial using the Vertex Helper I am drawing the Polygon but in many cases it…
Marine
  • 1,097
  • 7
  • 19
3
votes
1 answer

Box2D world size

I have created a box2d world, and I wanted to limit the height of the world. I did search google and apparently there was an option in the previous version of box2d where you would have to define the size of your world, but I am not sure if you…
Ahoura Ghotbi
  • 2,866
  • 12
  • 36
  • 65
3
votes
1 answer

box2d jittering when a body is magnetized

So i have some bodies(which i can create more and more at runtime), and i need them to be magnetized to the screen center. Let it be a (480/2 / WORLD_SCALE, 320/2 / WORLD_SCALE) in the world space. I am new to box2d so maybe there is an easy way to…
igrek
  • 1,415
  • 1
  • 12
  • 27
3
votes
2 answers

How do I give a Box2d Kinematic body a predefined curved path

I'm new to using Box2d and really can't find a consistent answer to my question so please excuse me. I'm writing a game for the iPhone -- who isn't these days -- and I'm using Cocos2d and Box2D. I have objects that move around in the game and I…
Aaron
  • 157
  • 1
  • 11
3
votes
2 answers

How to make a b2body move at a constant speed with box2d

I am making a box2d game and have enemies fly in from the left side of the screen to the right side of the screen. If I apply a force in the tick method like shown below, the enemies increasingly move faster over time. I want the enemies to move at…
user891123
  • 379
  • 2
  • 5
  • 16
3
votes
1 answer

Reducing the angle of reflection using Box2D

Folks, I'm trying to implement a certain behavior to a collision where a ball hits a wall at an angle. I want the ball to maintain full velocity, but I would like for the angle of reflection to be somewhat muted, so that it bounces back less from…
3
votes
0 answers

Box2D center the point of rotation for body with multiple fixtures

When I add multiple fixtures to a single body using Box2D, the body rotates around the centre point of the first fixture (polygon), instead of the centre point of the body (0,0). Imagine like this: The centre point of the shape is (0, 0). How can I…
ForsakenCreator
  • 83
  • 1
  • 12
3
votes
1 answer

How do I implement better time step (fixed or semi-fixed) in box2d?

I was wondering if someone could help me understanding fixing my time step within box2d. Im trying to improve a game I just released Bounce Z Ballz, by implementing a better time step (I currently use the built in variable time step). I have been…
SteveWight
  • 75
  • 2
  • 8
3
votes
1 answer

How to create a static body with b2PolygonShape vertices

I can´t seem to create a b2PolygonShape with vertices in my Box2D Cocos2D project. I get no errors but nothing shows up at the screen. How do you get a static body with b2PolygonShape vertices to work? I would like to use it with a list set up like…
Mattias
  • 3,907
  • 4
  • 28
  • 50
3
votes
2 answers

Developing A Simple Game without using Game Engines?

I am trying to develop a simple soccer game including penalty kicks in which i have to animate a ball from player to the goal post...earlier i have been using simple animations using a timer to add to the axis of ball image so that it moves from 1…
hemant
  • 209
  • 2
  • 4
  • 8
3
votes
1 answer

destroying an array of CCPhysicsSprites

In my code below, which I call in the update method, the CCPhyscisSprites are removed and their bodies are destroyed when array elements are off the screen. I put a CCLOG to check the array count and I always get 1 when all the sprites are off…
NSologistic
  • 745
  • 4
  • 14
3
votes
1 answer

how to create water like they did in LIMBO game using the cocos2d and box2d?

I have seen this before, and making my research i've discovered that if you create allot of circles objects in box2d, then apply a color, then blur it and at the end sharp it a little bit ( same stile like "Where is my water" game created by disney…
Ion Utale
  • 551
  • 1
  • 9
  • 22
1 2
3
27 28