Beginning Iphone game development collision
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(didCollideWith
])
[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 ???
}
}
}
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(didCollideWith
]) [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 ???
}
}
}
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| 3D game development | socialrender | 4 | 4,011 |
Jan 2, 2013 12:50 AM Last Post: NikG |
|
| Win a copy of: Beginning iPhone 4 Development: Exploring the iOS SDK | @iOS_blog | 0 | 2,718 |
Oct 1, 2011 04:23 AM Last Post: @iOS_blog |
|
| In the beginning | toonbit | 8 | 8,158 |
Apr 4, 2011 01:07 AM Last Post: toonbit |
|
| iphone 4 game development | andynov123 | 2 | 6,346 |
Jan 18, 2011 01:27 AM Last Post: JohnEdward |
|
| Problem with making a game with the iPhone Game Development book | MrPenguin9 | 2 | 4,437 |
Feb 1, 2010 09:13 AM Last Post: MrPenguin9 |
|

