Questions tagged [chipmunk]

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

See: The Chipmunk Website

318 questions
1
vote
0 answers

Chipmunk body collision with wall is rebounding normal to the wall

I am developing a top down board game using chipmunkJS. I have a circle body (carom board striker) having following parameters radius → 30 Density → 2 friction → 0.6 elasticity → 0.6 circle also having a positive moment of inertia. and a carom wall…
Amit
  • 219
  • 2
  • 7
1
vote
1 answer

Removing bodies from joints in Chipmunk Physics

In Box2D, when a body that is connected to a joint is removed from the space, the joint is automatically deleted and you can do stuff in callbacks and so on. Does Chipmunk do this? If so, how can I detect when a joint connection is 'broken'? Do I…
nornagon
  • 15,393
  • 18
  • 71
  • 85
1
vote
1 answer

Does Chipmunk support continuous collision detection yet?

I've been a Box2D user, but now I'm looking into Chipmunk. I don't think I want to leave my CCD behind though. Sources I'm finding all seem to indicate that Chipmunk does not implement CCD, but these sources are also all over a year old. I saw…
mjwach
  • 1,174
  • 2
  • 9
  • 25
1
vote
0 answers

Cocos2d-js 3.10(android) hangout some seconds each approximately 20 seconds

I'm making a game, using cocos2d-js 3.10. on android device, my game always stuck about 1->2 second each 20 seconds, it makes players feeling uncomfortable. I'm making a game shooting helicopter, i think may be because of cocos garbage collection or…
1
vote
1 answer

Making a Sprite unmovable...[Chipmunk & Cocos2D]

Im using Chipmunk with Cocos2d to make a gravity based puzzle game, however I have reached a part of my project whereby I need a sprite that once drawn does not move and cannot be moved by the other sprites within the environment. In essence... Can…
Candyfloss
  • 3,848
  • 4
  • 31
  • 32
1
vote
4 answers

Can someone explain this C# static class property?

I'm trying to port someone else's C# code to Xojo. There is the following definition in a class: static cpCollisionHandler cpCollisionHandlerDefault = new cpCollisionHandler( cp.WILDCARD_COLLISION_TYPE, cp.WILDCARD_COLLISION_TYPE, …
Garry Pettet
  • 8,096
  • 22
  • 65
  • 103
1
vote
4 answers

How to Include Chipmunk libraries to iPhone Xcode project?

[SOLVED] I copy the chipmunk folder structure from cocos2d+chipmunk template and build OK. Classes/Chipmunk/include/src for 'src' folder Classes/Chipmunk/chipmunk for 'include' folder Thanks to Beta for trying to help. ::::: I download chipmunk…
rubdottocom
  • 8,110
  • 10
  • 39
  • 59
1
vote
0 answers

Chipmunk with cocos 2d-x and iOS

I am developing a game for iOS using cocos-2dx to make the performance better, i have used chipmunk body added successfully but on run time when my sprite is moving on the screen the body stays on its original position let me paste the code. void…
1
vote
2 answers

Move Chipmunk Body to Sprite position

I have a Chipmunk shape, with a body, in a space. I am removing the body from the space so that I can position it and not have it fall due to gravity etc. I need to be able to make this body move, so I am not making it static. I need the body to…
Andrew
  • 141
  • 2
  • 11
1
vote
1 answer

Chipmunk: How to remove shape and body?

First, sorry for my English, im not an American. My question is how can I remove the shape and body from the space, this isn't related with collision detection. Im triying to do this with a touch event, specifically I'm trying to clear a ball…
Xenetrix
  • 339
  • 2
  • 19
1
vote
1 answer

Cocos2d-x 3 - Disable collision between two bodies and detect when them separate each other

I'm developing a cocos2d-x game (version 3.8). My game uses chipmunk physics and it has a static body that works like an interruptor. This interruptor is enabled when another body is over it. The interruptor is disabled when bodies separate each…
Daniel Albert
  • 757
  • 5
  • 22
1
vote
1 answer

Chipmunk body move with Parallax?

I'm using Cocos2D, SpaceManager and Chipmunk. I have a parallax node with 4 layers on it, this is tied to the location of a playable chipmunk body. This body needs to collide with static objects on one of the parallax layers, the static bodies…
Andrew
  • 11
  • 1
1
vote
2 answers

Use Chipmunk body location to drive Cocos2D Parallax

I'm using Chipmunk with SpaceManager inside of Cocos2D. I have a body which is moving around with impulses, I'd like to be able to use that bodies location to drive a parallax node in Cocos2D. So, when body 'a' moves to the left, the parallax…
Andrew
  • 11
  • 1
1
vote
0 answers

How do I implement a 2d skeleton in cocos2d-x v3?

I want to make a 2d skeleton, where each bone can be controlled from code. They also should have an accurate collision detection and physics. I have tried to make sprites with physical bodies and then make one sprite a child of the other. But when I…
Alen
  • 53
  • 5
1
vote
1 answer

Projectile hit coordinates at the apex of its path

I have a projectile that I would like to pass through specific coordinates at the apex of its path. I have been using a superb equation that giogadi outlined here, by plugging in the velocity values it produces into chipmunk's cpBodyApplyImpulse…
Rob
  • 13
  • 2