Questions tagged [chipmunk]

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

See: The Chipmunk Website

318 questions
2
votes
2 answers

Where to find reference to functions, which come with Chipmunk?

I'm new to iPhone development. I installed cocos2d with chipmunk and try to make a simple project from some tutorial. When I encounter chipmunk functions (like cpSpaceAddShape, cpSegmentShapeNew, etc.) where can I find them documented? Chipmunk API…
Eugene Chumak
  • 3,272
  • 7
  • 34
  • 52
2
votes
1 answer

Android Studio Update Gradle Issue

I just upgraded Android Studio to Android Studio Chipmunk 2021.2.1 and afterwards my gradle sync attempts are failing and I cannot debug my app any longer??? Getting: 7:12 AM Gradle sync needed Project was built with Android Gradle Plugin (AGP)…
BitWiseByteDumb
  • 159
  • 1
  • 12
2
votes
2 answers

Pass Variables to a Function in Objective C

Firstly, let me explain that I have googled this, and I can't seem to find a clear answer to this; but I believe this is because I am using incorrect terminology. I am moving a ball to a location in a cocos2d/chipmunk ipad app like this: //…
Doug Molineux
  • 12,283
  • 25
  • 92
  • 144
2
votes
1 answer

calculating force, velocity and distance in chipmunk

I am newbie with Cocos 2D, Chipmunk and Box 2D. I have started basic docs and started to develop games. Currently I am working with chipmunk. I stuck at few points And they are as follow. In my application, there is a player Who kick the soccer…
Arun Thakkar
  • 301
  • 5
  • 15
2
votes
1 answer

Using CCSprites in Cocos2d

I was wondering if anyone out there knows how I would attache a CCSprite to a cpConstraint and have it update with the physics. Here is my code: upper = [game.spaceManager addPolyAt:cpv(70,195) mass:300 rotation:0 numPoints:6 points:cpv(2,12),…
Stephen
  • 499
  • 9
  • 28
2
votes
2 answers

Multiple cpShapes (chipmunk)

So I have created two shapes( poly's to be exact) and I need to be able to attach them to a single CCSprite/image, and have them stay in the position that I have created them at. Is there any way to do that? So in short this is what I am trying to…
Stephen
  • 499
  • 9
  • 28
2
votes
0 answers

Dynamic Body can get into a Static Body (chipmunk physics)

i meet a trouble with chipmunk physic. I have a tank and a box here my code example: code fox Box: auto edgeSp = Sprite::create(); auto boundBody = PhysicsBody::createBox(Size(100,…
2
votes
1 answer

Ball rolling sound effect

I am working on a Labyrinth style app for iPhone using Chipmunk and openAL. I got everything working except the ball rolling sound. What I have tried is playing a small sound for each update in the ball's position so that the overall effect sounds…
Jagan
  • 38
  • 4
2
votes
2 answers

pymunk - How to restrict movement?

I'm making a pong clone with pymunk in order to learn how the lib works. I got the ball bouncing off the walls correctly, but the paddle still refuses to stay inside the rectangle defined by the segments, one on each side of the screen. def…
bzrr
  • 1,490
  • 3
  • 20
  • 39
2
votes
1 answer

Using Chipmunk physics - how can I tell the force of two colliding objects

If I have two objects in chipmunk (I'm using cocos2d-iphone), once I've detected that they collided, how can I tell how hard they are hitting each other? I want their force (vs. the velocity) to know the damage of the collision. I've seen…
JJ Rohrer
  • 2,671
  • 5
  • 29
  • 37
2
votes
0 answers

'Dtrace' error . Cocos2d-iphone 3.3 + SpriteBuilder + Chipmunk

I was making a game, ran it many times and it worked just perfect.Once this issue appeared, I can't even understand what was the reason.Missing any files? Cocos2d-iphone 3.3 + SpriteBuilder + Chipmunk …
user3475724
2
votes
2 answers

How to apply a force which should not be continuos

I have a body which I move with the help of a button, here is what I'm doing: -(void) step: (ccTime) delta { int steps = 2; CGFloat dt = delta/(CGFloat)steps; for(int i=0; i
user176845
2
votes
1 answer

Detect intersection without causing bodies to collide

I want to detect the intersection of two objects (sprites) in my scene. I don't want the object geometric intersection to cause a collision between the bodies in the scene. I've created PhysicalBody for both of my object shapes, but I can't find a…
Aviran
  • 5,160
  • 7
  • 44
  • 76
2
votes
1 answer

Compile pymunk on mac OS X

I have downloaded pymunk module on my computer. When I typed in "python setup.py install" in terminal, it says "no such file or directory", then I typed in the complete path of setup.py instead of setup.py, and it still could not run since the links…
AngieCris
  • 25
  • 4
2
votes
0 answers

chipmunk physics make static platform move

I have some static platforms which are not added to space - cpBodyNew(INFINITY, INFINITY) and some dynamic boxes with mass and moment which are added to space. When I need to move only static platforms I have very strange behaviour of dynamic…
Rost
  • 265
  • 1
  • 11
1 2
3
21 22