Just using the new sdk and noticed in the collision callback I got the joint info from the contact joint, and the m_attachBody_0/1 members were unset. Are these supposed to be the coliding bodies?
NewtonJointGetBody0/1 still work ok...
Moderators: Sascha Willems, Thomas
Aphex wrote:Just using the new sdk and noticed in the collision callback I got the joint info from the contact joint, and the m_attachBody_0/1 members were unset
void CPhysEngWrapper::ProcessContact(const NewtonJoint* aContactJoint, dFloat aTimestep, int aThreadIndex)
{
for (void* contact=NewtonContactJointGetFirstContact(aContactJoint) ; contact ; contact=NewtonContactJointGetNextContact(aContactJoint, contact))
{
//todo: find max speed collision and use that:
NewtonJointRecord info;
NewtonJointGetInfo(aContactJoint, &info);
mBody1 = info.m_attachBody_0; // m_attachBody_0 ptr = garbage
mBody1 = NewtonJointGetBody1(aContactJoint); //works fine
...
}
Users browsing this forum: No registered users and 14 guests