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
0
votes
1 answer

Box2D with UIKit - Body Physics

I followed this tutorial on how to add Box2D to my existing ViewBased Application. http://www.cocoanetics.com/2010/05/physics-101-uikit-app-with-box2d-for-gravity/ Now when my body/UIButton is above half way my screen, it flies upward. and when…
ManOx
  • 1,935
  • 5
  • 23
  • 37
0
votes
1 answer

Box2D sleep time

I was just wondering if there was a way to change the amount of time until the sleep state is activated for a body in box2d (cocos2d). I currently use the sleep state as a way to end a game so it is preferable if I can speed up the time it takes to…
John Smith
  • 635
  • 1
  • 10
  • 19
0
votes
1 answer

Detecting collision of two bodies, each one has different shape

I want to detect collision between two bodies, one body has circle shape and another one has convex body (by using vertexes and number of vertexes), and I use contact listener class to detect collision between bodies. I tried detect collision…
aakatheeri
  • 63
  • 6
0
votes
1 answer

Cocos2D Particles Following b2Body?

I am able to implement particle system in cocos2d and now i want to attach my particle with a dynamic b2Body, so that, it can follow the body. I have found a tutorial about Cocos2D Particles Following b2Body at [this site]. But not understand "how…
Zishan
  • 17
  • 4
0
votes
1 answer

accessing box2d userdata

I know that this might sound pretty simple. I am having a problem with accessing the userdata of a b2Body in one method through the update method. I need to access the userdata property in the update method to set multiple gravities. I am just not…
cocoder
  • 1
  • 2
0
votes
1 answer

How to Create a joint (b2RevoluteJoint, b2MouseJoint, b2WeldJoint etc) using GBox2D (cocos2d)

I have read a nice tutorial MonkeyJump where Andreas Loew show, how to make a physics game using TexturePacker, PhysicsEditor and GBox2D. My question is, how to create a joint (b2RevoluteJoint, b2MouseJoint, b2WeldJoint etc) using GBox2D. I have…
Zishan
  • 17
  • 4
0
votes
1 answer

What a measure of velocity in Box2d?

What a measure of velocity in Box2d (iPhone, C++)? When we use command body->GetLinearVelocity(), what measure we get? (example, km per hour or meteres per second)
Sinba
  • 314
  • 3
  • 12
0
votes
1 answer

How do I resize a b2CircleShape on cocos2d iPhone with Box2D

I have a 2D physics sandbox with a bunch of circles which resize on contact (the bigger one gets bigger, the smaller one gets smaller). I can resize the sprite fine, and I understand that you can't scale a B2Body - you need to destroy it and…
glenstorey
  • 5,134
  • 5
  • 39
  • 71
-1
votes
1 answer

button tapping speed, two buttons, to increase points

im trying to make a simple game on cocos2d box2d, its basically got two buttons and a label with the points. the points increment by +1 every second. what im trying to do is, the player taps both buttons sequentially so it has to be 'button1' then…
sahil
  • 141
  • 1
  • 9
-1
votes
1 answer

Drag and drop UIViews with Box2d (iOS)

I recently found a nice tutorial for enabling physics with Box2d for iOS. http://www.cocoanetics.com/2010/05/physics-101-uikit-app-with-box2d-for-gravity/ I'm just wondering how to implement drag and drop for a UIView. Can anyone provide any…
Sam
  • 1,741
  • 5
  • 18
  • 22
-1
votes
2 answers

How to Implement waving(Like pendulam) ropes effect in COCOS2D?

I am trying to implement wave effect when any thing hits the hanging object, how can I achieve the both,: 1.Hang an object in air(as it will be a dynamic body which will wave) 2.implement waving effect on that body Thank You
rptwsthi
  • 10,094
  • 10
  • 68
  • 109
-1
votes
1 answer

Get touch speed / velocity and move box2d body at this touch position

I make one box2d game and I have some problem based on touch. I desired one box2d body object moves on touch with speed / velocity. I have an Ant box2d body with revolute joint and I try to move that box2d body object with touch and speed of touch.…
DharaParekh
  • 1,730
  • 1
  • 10
  • 17
-1
votes
1 answer

How do I make Enemy sprites spawn in cocos2d at Random

i have been looking around the Internet to find out how to spawn Enemy Sprites at rondom, in a random place, I'm making a game that involves a sprite jumping an it has to dodge these 'Enemy' sprites or objects blocking it's path. If anybody has any…
user2501236
  • 11
  • 1
  • 2
-1
votes
1 answer

Box2d Radial Gravit Limitation coco2d

I have been tweaking with the following code to create radial gravity, http://www.vellios.com/2010/06/06/box2d-and-radial-gravity-code/ now its working fine, but I wanted it so that for example this code only gets triggered if my current sprite is…
-1
votes
2 answers

how to pin/stick a box2d body to the ground

How can I pin or stick a box2d body (circle or polygon shape) to the ground (body). Sorry if this sounds quite simple, I've not been able to find anything relevant on this. Please help.
Fannie
  • 21
  • 4
1 2 3
27
28