This project is read-only.

How to know in what object I'm colliding???

Jan 24, 2008 at 6:08 PM
Edited Jan 24, 2008 at 6:53 PM
Hi again,,,

I'm doing a test:

- teapot (my character)
- Area A (left)
- bridge(a flyer box, travelling left/right and right/left)
- Area B (right)

my problem is detect the collision when my teapot (character) moving around move to up of bridge, because when the bridge move, the character should to go too...

I'm adding the objects in:

floorBodies = new List<Body>();

I'm too adding them to collision system:


and, in the method update, I test every time IF occour a collision:

collisionSystem.DetectAllCollisions(floorBodies, collisionFunctor, null, -0.05f);

if (collisions.Count > 0)
// ...

now, how do to know in what object I'm colliding, to move my character together with bridge???

I know exist the member "collisionsnumber of collision.SkinInfo.Skin0.ID", but dont have some descritive???? a propertie name???

or some other way do same thing...


Jan 24, 2008 at 10:41 PM
mhhh, i don't fully understand your problem because your english is even worse than mine :P But have you tried to use the SkinInfo.Skin0.Owner Property? That should return the correct body.
Jan 25, 2008 at 1:14 AM
:-) rsrsrsrs (laughs),

I'm sorry my english...

but, I understand, thank's by your tip... :-)