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 Application Development - Basic Steps for Beginners kevinvwallace 1 1,163 Mar 20, 2014 06:59 AM
Last Post: FinleyScott
  3D game development socialrender 4 5,808 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,053 Oct 1, 2011 04:23 AM
Last Post: @iOS_blog
  In the beginning toonbit 8 8,818 Apr 4, 2011 01:07 AM
Last Post: toonbit
  iphone 4 game development andynov123 2 6,928 Jan 18, 2011 01:27 AM
Last Post: JohnEdward