I want to find out the friction and restitution for both of the involved materials whenever my player collides with an object.
Part of the code is:
const float f1 = obj1_comp->GetMaterial(0)->GetPhysicalMaterial()->Friction;
const float f2 = Hit.PhysMaterial.Get()->Friction;
I put zero in for the material index, but what if the collision didn’t happen against that particular material?
I am fairly new to UE4 and I’m not quite sure how complex characters with multiple materials work, so forgive me if I’m not asking the right question.