Closed Avindr closed 1 year ago
I have added favour tag methods to the event definition to fully support the different modes of favour tagging for events. These are Exclusive, Inclusive, Stacking and None. This will be available with the next update.
After reviewing the code, I have not been able to determine any issue with the cost calculation. Additionally, contact matching behavior continues to function correctly in the demo.
Looking at the code provided, I am not sure that the contacts are being setup correctly. I would need to see more information on how secondContact is determined. In particular line 2:
Vector3 tranformedSecondContact = referenceTransform.transformDirection(secondContact).normalized * secondContact.magnitude
If secondContact is in world space already then it does not need to be transformed like this, it could be added straight into the contact. Otherwise, if it is already in local space of the character, it could just be converted as follows:
Vector3 transformedSecondContact = referenceTransform.InverseTransformPoint(secondContact); eventDefLanding.AddEventContact(referenceTransform.position, 0.0f); eventDefLanding.AddEventContact(transformedSecondContact, 0.0f);
Extra Note: Since rotation isn't being matched or warpedin this case, the rotation angle on the contact can just be set to zero to save resources.
No further information provided to pursue this further.