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
  framework for 2d game development? MikeAlive 2 856 Jul 17, 2014 05:39 AM
Last Post: IceD34ler
  3D game development socialrender 4 6,308 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,278 Oct 1, 2011 04:23 AM
Last Post: @iOS_blog
  In the beginning toonbit 8 9,252 Apr 4, 2011 01:07 AM
Last Post: toonbit
  iphone 4 game development andynov123 2 7,295 Jan 18, 2011 01:27 AM
Last Post: JohnEdward