box2d « box2d « iPhone iPad Media Q&A

Home
iPhone iPad Media Q&A
1.animation
2.audio
3.AVAudioPlayer
4.box2d
5.cocos2d
6.CoreGraphics
7.CorePlot
8.Flash
9.graphics
10.icon
11.image
12.photo
13.plot
14.sound
15.video
iPhone iPad Media Q&A » box2d » box2d 

1. Would Apple reject an app from the iphone app store for using box2d?    stackoverflow.com

I am contemplating using Box2d for making iphone apps, but I don't want to worry about Apple rejecting my app for using Box2d. How does box2d work? http://www.box2d.org/ Would ...

2. Chipmunk Physics or Box2D for C++ 2D GameEngine?    stackoverflow.com

I'm developing what it's turning into a "cross-platform" 2D Game Engine, my initial platform target is iPhone OS, but could move on to Android or even some console like the PSP, ...

3. Casting to derived type problem in C++    stackoverflow.com

I am quite new to C++, but have worked with C# for years, however it is not helping me here! :) My problem: I have an Actor class which Ball and ...

4. how to make arc shape in box2d for iphone    stackoverflow.com

hey guys i m looking for how some one can achieve the curve or concave shape in box2d for iphone i m stuck with this... Thanks in Advance... Umer Sufyan.

5. Box2d Calculating Trajectory    stackoverflow.com

I'm trying to make physics bodies generated at a random position with a random velocity hit a target. I gleaned and slightly modified this code from the web that was using ...

6. Objects that defy gravity but collide with others in Box2D. How?    stackoverflow.com

newbie to iPhone game development and Box2D here. I'm developing a game in which I can move (drag) otherwise stationary objects that can collide with other objects. How do I make these objects ...

7. box2d:Disable bounce on collision    stackoverflow.com

I have some box,creating using box2d,which restitution's are set to zero.but when they fall over one another there appear bounce event.but i don't want that...i want them not move when fall over ...

8. box2d world :: everything is so light !    stackoverflow.com

i'm using box2d 2.1.2 with cocos2d 0.99.4 in my world, everything is light, there is no sensation about dropping a stone or a box !! everything falling slowly at the same speed

b2Vec2 gravity; ...

9. How can I move box2d object?    stackoverflow.com

I have a player character and I would like him to fire bullets, one each second. It's a top down view, no gravity. I've been doing it with SetLinearVelocity() and ApplyLinearImpulse() and the ...

10. How do I create a custom polygon with box2d for iphone framework?    stackoverflow.com

I would also like to know when each object is selected. is this possible with box2d? Thanks

11. How to move an Object using Slingshot in different Angles?    stackoverflow.com

I'm a beginner in iPhone Application Development and Xcode who is developing a small game which has a slingshot effect Box2d. Currently i need help on moving a body in its ...

12. moving a texture.?    stackoverflow.com

I'm currently drawing a CCSprite as a line to a CCRenderTexture multiple times in touches moved and create a body for it. I am able to move the body in random ...

13. Friction question. Need an advice :)    stackoverflow.com

I have a moving player in a Box2d world and a moving platform which is in the box2d world too. Now i my player jumps on the top of the platform my ...

14. Objective C and c++ import problem. Simple but I don't get it    stackoverflow.com

I'm using cocos2d and box2d.(iPhone SDK) If I want to import box2d I add this to the top of the file #import "Box2D.h" and then I rename my class to ".mm". ...

15. Box2d sensor rotation problem    stackoverflow.com

in my app the user is able to move or rotate a box2d fixture. The collision detection works fine. But if I set the fixture as a sensor, with the SetSensor(true) ...

16. Cannot set "setAsEdge" in Box2D (iphone). Simple but dont understand it    stackoverflow.com

first my code

// Define the ground body.
        b2BodyDef groundBodyDef;
        groundBodyDef.position.Set(0,0); // bottom-left corner

     ...

17. iPhone physics engine for fluid/water simulation?    stackoverflow.com

I'm about to start developing a game that's main feature revolves around 2D water simulation. I have thought about starting with Box2D and designing water in that engine, but I'm not ...

18. Ball sticking to walls    stackoverflow.com

I'm experimenting with box2d. I seem to have a problem people describe as sticky walls I have a ball and a paddle I'm using all the basic recommended scales i could find, 10m world, ...

19. How to get the position of a sprite in Box2d in iPhone    stackoverflow.com

Help me out with some sample code for getting the position of a sprite in Box2d in iPhone.

20. Box2d on iphone with joined objects    stackoverflow.com

Hi Im trying to get my head around using box2d for an iphone app. I can make basic objects and have collision detection and other forces applying fine but im wondering how ...

21. How to destroy a body based on its position in box2d?    stackoverflow.com

I am new to objective-c. I am currently working on a game using cocos2d and box2d. Let me describe my game in details: In my game I have a main character standing ...

22. Box 2D - Is there a way to Move the Ground b2EdgeShape up    stackoverflow.com

I'm working on an iPhone game, and the ground is a long, repeating rectangular sprite object that extends about 30 pixels above the bottom of the screen. I'm trying to align ...

23. Drag pointer and jump body in box2d iphone    stackoverflow.com

Hi i am trying to create a game like bucket ball, i am using box2d as physics engine with UIView in iPhone, i create world and add object into it. set every thing fine. but ...

24. How to apply constant force on a Box2D body?    stackoverflow.com

I am making a Box2d game for the iPhone. I need to apply a force on a body which represents my main character. The body is actually a rectangle on top ...

25. touchBegan timestamp    stackoverflow.com

In my game I need to calculate duration of touch. I did this by :

-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {  

self.endTime = [NSDate date];  //NSDate *endTime in ...

26. box2d var access from diff class in iphone using c++    stackoverflow.com

i have a car.h now inside the car.h i did

float cc;
void Step(Settings* settings)
    {


        Test::Step(settings);


    cc=m_rightWheel->GetWorldCenter().x;// cc hold ...

27. calculate distance in CGpoint between two CGPoint    stackoverflow.com

i need to calculate distance in CGPoint between given two point(CGPoint) i refer this and this but i dont know how to get distance in CGPoint. so if any one knows ...

28. Box2D & Alpha Channel    stackoverflow.com

I'm doing a iPhone game and I want to use Box2D for collision detection. The game has a very large map(3000x3000) which has rivers,rocks etc as collision objects. The game uses ...

29. Box2D dynamic body getting stuck (iPhone)    stackoverflow.com

I have a ground object and a spear shaped object(dynamic). When a button is pressed, a linear velocity is applied to the spear. It works fine but sometimes, it gets stuck ...

30. Box2d - Dynamic Sensors?    stackoverflow.com

so I have this dynamic body, that I just want to know when an object collides with it, but even if this object collides with it, the dynamic body will always ...

31. Box2D xcode project compiler errors "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1"    stackoverflow.com

I'm trying to compile the Box2D.xcodeproj from the box2d svn repo. When I loaded up the project I had a warning saying that:

Missing SDK in target Box2D: iphoneos2.2
And ...

32. Box2d dynamic body stuck to static    stackoverflow.com

Sometimes, when dynamic body moving and collide static body, dynamic stuck, and stopping. http://imageshack.us/photo/my-images/14/screenfgz.png/ (top and bottom lines are sensors, center shape is body) For moving used mouseJoint->SetTarget(pos); Settings: World

b2Vec2 gravity = b2Vec2(0.f, ...

33. How to gain access to Box2d's b2CollideCircles in Objective-C?    stackoverflow.com

I'm trying to test out some collision detection with Box2d (using this method). I've added the source and headers to my XCode project, and have added a recursive ./** ...

34. BOX2D static body friction    stackoverflow.com

I am creating a ground body like this:

    // Define the ground body.
    b2BodyDef groundBodyDef;
    groundBodyDef.position.Set(0, 0); // bottom-left corner

   ...

35. please help in projectile motion using box2d    stackoverflow.com

I am stuck at creating projectile motion in my games using box 2d please help in solving this problem something like this Some thing like this

36. Fast collision detection    stackoverflow.com

Imaging, there are 20 types of objects. What fast methods exist to detect which objects collide now in Box2d? A scan with switch/if is not fast enough.

37. Reducing the angle of reflection using Box2D    stackoverflow.com

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 ...

38. Box2d Collision Detction - to tell which edge it collided?    stackoverflow.com

I'm using box2d to implement collision detection for my game. In most cases, any type of collision detection does something like "remove enemy" or things like that which is uniform regardless of ...

39. iPhone Box2d 3GS Problem    stackoverflow.com

I just finished my game with the combination of Box2D and the Sparrow framework (http://sparrow-framework.org/) and it has just one main screen with max. 10 Box2D objects on the screen. So, ...

40. HTML 5 game development tools    stackoverflow.com

Can anybody please guide me with the best engine for game development in HTML5? It is simple jumping and surface detection game. The theme is is like jumping and go above the ...

41. Coordinate CCSprite with b2Fixture    stackoverflow.com

I have created a single body in box2D, which consists of 2 fixtures. I have a CCSprite userData for each fixture, but i don't know how to set the sprite position and ...

42. How to add tag (identifier) to box2D object (objective - c)    stackoverflow.com

i'm developing an app that uses Box2d. When I try to do something like this :

NSString *s = @"wood";

bodyDef.userData.name = s; 
I get error
request for member 'name' in 'bodyDef.b2BodyDef::userData', which ...

43. How many pixels is an impulse in box2d    stackoverflow.com

I have a ball that you blow on with air. I want the ball to be blown more if it is close to the blower and blown less if it is ...

44. How to handle multitouch    stackoverflow.com

I am writing an app in xcode using box2d. Right now I am using the code below. The problem is that it will only handle one touch event. How can I ...

45. How to add a b2Vec2 to a class    stackoverflow.com

I have a class that I want to contain a b2Vec2 and an integer. I keep getting an error that says expected specifier-qualifier-list before 'b2Vec2'. I can't figure this out. Please ...

46. How to restrict motion to vertical in box2d    stackoverflow.com

I have a box2d body that has a fixture of a ball. It just bounces up and down on top of a rectangular box. Sometimes it will fall off of the ...

47. Why doesn't gravity scale work in box2d    stackoverflow.com

I am trying to turn off gravity on one of my bodies. I have used the bodyDef.gravityScale = 0.0f but I am having no luck. Here u can look at my ...

48. Object starts spinning when applying linear impulse - iPhone    stackoverflow.com

In my game I'm using Box2D to apply linear impulse to a circle object. When the impulse is applied to the object, it starts spinning clockwise but I can't get it ...

49. box2d jittering when a body is magnetized    stackoverflow.com

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, ...

50. Draw line using Box2D (iPhone)    stackoverflow.com

I am working on an iOS game and I need to draw a line that Box2D bodies can interact with. I have tried the code below, but it causes performance issues ...

51. Box2D polygons not colliding properly    stackoverflow.com

I'm trying to save a scene and re-load it using Box2D on iOS but the problem I'm having is that after reading the scene from file the polygons don't collide properly. ...

52. Box2D calculating the direction of motion where the body can rotate    stackoverflow.com

In my top down car physics, i'm trying to find the direction of travel for the car. I can get the Linear Velocity of the car but am having problems because:

  • the car ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.