DoerrSt
Member
|
ReportContact
Hi,
I could'nt find any sample of the reportcontact-function. Did I oversee something?
Thanks,
Stefan
|
|
02-20-2014 10:24 AM |
|
KraaxLeNain
Member
|
RE: ReportContact
Hi.
What are you trying to do ?
ReportContact is -if I remember well- a function that say to ignore or report contact between specific objectType. Hence it's not having direct effect, it just says if contact between these objects should be taken into account during other physical check -hope I'm not saying false things since I don't have headers in front of my eyes-.
If you want to have something done when two objects collide you should use PhysCallBacks and perform in the callback what you want (or better store information about the contact and make things you want to do outside the physical CallBack wherever it's fitting).
See "cuts" and "sweep" functions in the physics header (and tutorials) and use a physical callback in entry parameter with an override type, ex :
Code:
struct MyCallBack : PhysCutsCallback /
{
virtual Bool hit(ActorInfo &actor_info)
{
if(actor_info.obj)
{
[some tests]
{
<perform something // store information about contact so something should be perform afterward>
Log(S+"You found me ! \n "); //Test if callback was triggered
}
}
}
return true;
}
};
Don't know if it's helping since I don't get what you are trying to do.
(This post was last modified: 02-20-2014 01:36 PM by KraaxLeNain.)
|
|
02-20-2014 01:17 PM |
|
DoerrSt
Member
|
RE: ReportContact
Thanks for your fast reply. Basically this is exactly what I was looking for. I only want to see if object A has contact with object B. Perhaps PhysCallBacks are a better solution for this. I'll try that.
Nevertheless I try to understand how the different (beside of the comments in the header-files undocumented) functions of Esenthel are working and your example helps me a lot understanding.
|
|
02-24-2014 10:57 PM |
|