Questions tagged [chipmunk]

Chipmunk is an open-source physics library written in C.

See: The Chipmunk Website

318 questions
2
votes
1 answer

Applying forces at different points fails to create torque in pymunk

I'm using pymunk to apply forces to a circular body at the ends of its diameter. The forces are of different magnitudes, and neither has an x-component (relative to the body, that is, so they are perpendicular to the diameter). I would expect these…
desophos
  • 207
  • 1
  • 9
2
votes
1 answer

Rotate a body around its center by applying an orthogonal force to it in Chipmunk

I'm trying to rotate a body around its own center by applying an orthogonal (to the body direction) force and generating the torque needed. However, this also moves the body (naturally) and I need it only to rotate. Here is my code. Please note that…
Rad'Val
  • 8,895
  • 9
  • 62
  • 92
1
vote
1 answer

Cocos2d + Chipmunk Physics - cpBodyApplyImpulse()

So I am working on a game, essentially, its a top down view of a ball. When I click the ball, I basically want to launch it in a given direction. It would be instantaneous force (think hitting a pool ball with the cue). I am trying to use…
Andy Hin
  • 30,345
  • 42
  • 99
  • 142
1
vote
1 answer

Updating images through Chipmunk (and any beginners guides)

so I am having some problems with chipmunk, please realize that I am new and am just learning many of the ideas around chipmunk and if you have any good books, sources, or websites that I could use to learn chipmunk that would be great (please only…
Thermo
  • 55
  • 1
  • 5
1
vote
2 answers

cpSpaceHashEach - 2 problems at the same line

I'm trying to grasp basics of Chipmunk. In some tutorial I found a line: cpSpaceHashEach(space->activeShapes, &updateShape, nil); But I get 2 mistakes here: 1) Implicit declaration of function is invalid in C99 2) No member named 'activeShapes' in…
Eugene Chumak
  • 3,272
  • 7
  • 34
  • 52
1
vote
2 answers

Pixel collision detection?

In my app, I have a bunch of CCSprites and I want to have a collision detection feature that will work only when the non-transparent pixels in the CCSprites collide. I don't want to be restricted to color between the colliding sprites. I think thats…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
1
vote
1 answer

Cocos2D file not found?

I downloaded cocos2d, the latest version. I added the folders 'cocos2d' 'cocosdenshion' 'external' 'cocoslive' and 'experimental' to my project folder, then I dragged them to my project without clicking add to destination group project button. But…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
1
vote
1 answer

chipmunk and static bodies : if the game map is to large for the screen, I can move sprites but how can I move static bodies and shapes?

I think the title is pretty clear. The way I see it is there are two things : the sprites for display the bodies for physics Sprites can be moved in the screen when the level to display is to wide for the screen. But static bodies ? Can they be…
Marcel Falliere
  • 1,884
  • 21
  • 39
1
vote
0 answers

Has anyone identified how to install "Android Drawable Import" on Android Studio "Chipmunk"

I'm new to Android coding and I'm taking an online tutorial from Udemy.com, and so far I'm really pleased with the quality. In one section the instructor is wanting us to install Android Drawable Import and like many it is failing on Android Studio…
1
vote
2 answers

Accessing a property from a C method in Cocoa

I'm trying to learn Objective C & Cocoa, but I just can't manage to access a property inside an Object. Specifically an object from a C method. I'm working with the chipmunk dynamics library. Chipmunk has something similar to NSPoint called cpVect.…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
1
vote
1 answer

chipmunk physics: how to predict the path of a body including bounces

I need to predict the path of a body, including bounces with other bodies, in chipmunk physics. Is there any way to do that?
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
1
vote
1 answer

How to tell when a sprite has stopped moving

In chipmunk/cocos2d, I have the classic bouncing ball demo happily running with an arbitrary number of balls. How can I tell when a sprite has stopped moving (i.e. the ball has settled to the bottom and is "done")? I tried declaring float prevX,…
Rayfleck
  • 12,116
  • 8
  • 48
  • 74
1
vote
1 answer

pymunk custom complex creatures

I am trying to create an evolution simulator, something very similar to this. As for tools I am using pymunk physics simulator with pygame. My creatures consist of few circles with their respective bodies fixed together with DampedSprings as…
1
vote
2 answers

How to get the force exerted on a body when a collision happens in Pymunk

I'm trying to make a game where the player shoots at objects, and when the 'bullet' hits the objects should disappear. Right this works fine, but now I'm trying to make it so the objects only disappear if the bullet gives a certain amount of force…
jifeh56745
  • 11
  • 1
1
vote
1 answer

Is there any good chipmunk/cocos2d sample source out there?

I'm looking for sample to help me understand the how chipmunk physics works ... So I'm asking : is there any source code available out there ?
Marcel Falliere
  • 1,884
  • 21
  • 39