Hi Julio,
I am trying to use NewtonJointSetDestructor for contact joints so the app can be notified when its about to be deleted. It doesn't look like the function is currently implemented though.
Moderators: Sascha Willems, Thomas
void DemoEntityManager::OnCreateContact(const NewtonWorld* const world, NewtonJoint* const contact);
void DemoEntityManager::OnDestroyContact(const NewtonWorld* const world, NewtonJoint* const contact);
MeltingPlastic wrote:The only reason I have a handle to it is because I needed a way to poll whether or not the Joint was currently Active in the main thread.
In my main thread I have a function that "polls" contacts so which in turn sends Urho3D Events to the rest of the engine. There are 3 events: OnCollisionStart, OnContinuedCollision, OnCollisionEnd.
I can't send events directly from the callback because they could be running in a separate thread, so in the callback I save to a list that lives in the main thread and then poll and send events later. In the poll routine I call NewtonJointIsActive(). That's the only call I have. I added it because the callback didn't seem to be called when the joint became inactive. Assuming that the joint was inactive if I didn't get a callback wasn't working for me either.
Users browsing this forum: No registered users and 6 guests