Hello, I want to create "bullets" in my game, the bullets are meshes with collision skin, so I need the technique for detecting which object collides with the bullets.
I believe you might be looking for this:
http://jiglibx.wikidot.com/catch-collisionevents
If you've already gone that far, you have the skins of both objects, and the skins can contain any data you'd like. You just make your own skin class if you need. You can see in this example below, in my engine I can grab the entityID from the skin itself. That ID is all I need to communicate with any object. You could use any data you want in place of this ID.
public bool CollisionHandler(CollisionSkin self, CollisionSkin other)
{
CollisionData data;
bool SelfIsPhantom = (self is PhantomCollisionSkin);
bool OtherIsPhantom = (other is PhantomCollisionSkin);
// Fill in data for the two colliding entities
if (SelfIsPhantom)
{
PhantomCollisionSkin phantom = self as PhantomCollisionSkin;
data.ListeningEntity.IsPhantom = true;
data.ListeningEntity.EntityID = phantom.EntityID;
}
else // If we ever have more than two skin types, this will need to be an 'else if', but for now we can assume it's a QSCollisionSkin
{
QSCollisionSkin qsSkin = self as QSCollisionSkin;
data.ListeningEntity.IsPhantom = false;
data.ListeningEntity.EntityID = qsSkin.EntityID;
}
if (OtherIsPhantom)
{
PhantomCollisionSkin phantom = other as PhantomCollisionSkin;
data.OtherEntity.IsPhantom = true;
data.OtherEntity.EntityID = phantom.EntityID;
}
else // If we ever have more than two skin types, this will need to be an 'else if', but for now we can assume it's a QSCollisionSkin
{
QSCollisionSkin qsSkin = other as QSCollisionSkin;
data.OtherEntity.IsPhantom = false;
data.OtherEntity.EntityID = qsSkin.EntityID;
}
}

Hi Nick, thanks for the info there but to a newer person like me, it's a bit cryptic. Could you answer a few questions for me?
What is the structure of the CollisionData class?
What is the structure of the PhantomCollisionSkin and how is this passed to the function?
What is QSCollisionSkin and does a class of base class CollisionSkin need to be implemented to get this to work?
Where are you placing the Handler?
I may be reading too much into this considering my little knowledge, could it be just that you are making a seperate list of ID's that reference collisionskins somehow? If so, how do you differentiate between the skin being used and the ID you are using?

I have tried to research this tbh. I followed your link and found several others thtat stated similar solutions. What I'm beginning to believe is that JigLibX already has this entire collision structure and detection implemented (obviously somehow or object would not collide) but is there a way to tap into that directly or is it necessary to write an entire collision detection check of our own?
