Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/261302677735108610
deleted 9 characters in body
Source Link
Joey Green
  • 2.5k
  • 4
  • 27
  • 46

I'm using cocos2d to program a game and am using box2d for collision detection. Everything in my game is a circle and right not for some reason I'm having a problem with some times things are not being detected as a collision when thythey should be.

I'm thinking of rolling up my own collision detection since I don't think it would be too hard.

Questions are:

  1. Would this approach work for collision detection between circles?
    a. get radius of circle A and circle B.
    b. get distance of the center of circle A and circle B c. if the distance is greater than or equal to the sum of circle A radius and circle B radius then we have a hit
  2. Should box2d be used for such simple collision detection? There are no physics in this game.

I'm using cocos2d to program a game and am using box2d for collision detection. Everything in my game is a circle and right not for some reason I'm having a problem with some times things are not being detected as a collision when thy should be.

I'm thinking of rolling up my own collision detection since I don't think it would be too hard.

Questions are:

  1. Would this approach work for collision detection between circles?
    a. get radius of circle A and circle B.
    b. get distance of the center of circle A and circle B c. if the distance is greater than or equal to the sum of circle A radius and circle B radius then we have a hit
  2. Should box2d be used for such simple collision detection? There are no physics in this game.

I'm using cocos2d to program a game and am using box2d for collision detection. Everything in my game is a circle and for some reason I'm having a problem with some times things are not being detected as a collision when they should be.

I'm thinking of rolling up my own collision detection since I don't think it would be too hard.

Questions are:

  1. Would this approach work for collision detection between circles?
    a. get radius of circle A and circle B.
    b. get distance of the center of circle A and circle B c. if the distance is greater than or equal to the sum of circle A radius and circle B radius then we have a hit
  2. Should box2d be used for such simple collision detection? There are no physics in this game.
edited title
Link
Joey Green
  • 2.5k
  • 4
  • 27
  • 46

Box2d totoo much for Circle/Circle collision detection?

Source Link
Joey Green
  • 2.5k
  • 4
  • 27
  • 46

Box2d to much for Circle/Circle collision detection?

I'm using cocos2d to program a game and am using box2d for collision detection. Everything in my game is a circle and right not for some reason I'm having a problem with some times things are not being detected as a collision when thy should be.

I'm thinking of rolling up my own collision detection since I don't think it would be too hard.

Questions are:

  1. Would this approach work for collision detection between circles?
    a. get radius of circle A and circle B.
    b. get distance of the center of circle A and circle B c. if the distance is greater than or equal to the sum of circle A radius and circle B radius then we have a hit
  2. Should box2d be used for such simple collision detection? There are no physics in this game.