I was implementing different surface materials for different faces of one body and all I working well. I can cast a ray and detect if I hit a metal or wood part of the body. Great! But it's not working when the ray hits a body with collision primitive, boxes in my case.
- Code: Select all
NewtonCollisionRayCast(
NewtonBodyGetCollision(pickedBody),
lineStart,
lineEnd,
normals_array,
&faceAttribute);
With primitives, the faceAttribute variable contains garbage. I looked and I couldn't find a NewtonCollisionSetFaceAttribute or similar. Any ideas? UserID for collisions is already in use so I cant use that.

