Beginning Iphone game development collision

Nibbie
Posts: 1
Joined: 2010.10
Post: #1
anyone using Beginning iphone game development book framework?
i'm using that framework in collision. the function collision seems weird when checking two object with the same class. how to resolve it?
what is wrong with this
// now check to see if anything is hitting anything else
for (BBSceneObject * colliderObject in collidersToCheck) {
for (BBSceneObject * collideeObject in allColliders) {
if (colliderObject == collideeObject) continue;
if ([colliderObject.collider doesCollideWithCollider:collideeObject.collider]) {
/*if ([colliderObject respondsToSelector:@selector(didCollideWithSmile])
[colliderObject didCollideWith:collideeObject];
*/
[colliderObject setTranslation:BBPointMake(0, 0, 0)];
//if i set colliderObject translation to 0,0 the collideeObject translation is follow changed to 0,0 too ???
}
}
}
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  iPhone game development coming funkboy 73 37,045 Jan 15, 2015 04:35 AM
Last Post: NuDeveloper
  framework for 2d game development? MikeAlive 2 1,313 Jul 17, 2014 05:39 AM
Last Post: IceD34ler
  3D game development socialrender 4 6,622 Jan 2, 2013 12:50 AM
Last Post: NikG
  Win a copy of: Beginning iPhone 4 Development: Exploring the iOS SDK @iOS_blog 0 3,419 Oct 1, 2011 04:23 AM
Last Post: @iOS_blog
  In the beginning toonbit 8 9,523 Apr 4, 2011 01:07 AM
Last Post: toonbit