SimApi Physics AddContactReport

From SIMboxWiki
Jump to navigation Jump to search

Icon attributes.pngstatic int SimApi::Physics::AddContactReport(NxUserContactReport *i_pContactReport)


    Registers a contact report class instance in the PhysX scene, so each contact occurs will call the OnContact callback in the supplied class instance.


    i_pContactReport - a pointer to PhysX NxUserContactReport class


    Type: int   Description: An integer handle used for removing the contact report


    Code Sample

class CCustomContactReport:public NxUserContactReport{


	virtual void  onContactNotify(NxContactPair& pair, NxU32 events);

CCustomContactReport myContactReport;
int reportH(-1);
reportH = SimApi::Physics::AddContactReport(&myContactReport);

    See Also