[MTTB-409] Fix a Healer ability doesn't work (#893) by nanho-lee · Pull Request #893 · Unity-Technologies/com.unity.multiplayer.samples.coop

Description

This is the PR that fixed the following issue.
To solve the above issue, I did three things.

1.

Fixed a bug where the character's orientation was flipped if the target and current location were almost the same when the skill was triggered. In that case, the character's orientation is used.
ClientInputSender.cs

//there is a bug where the direction is flipped if the hitPos and current position are almost the same,
//so we use the character's direction instead.
float directionLength = offset.magnitude;
Vector3 direction = float.Epsilon >= directionLength ? (offset / directionLength) : m_PhysicsWrapper.Transform.forward;

2.

mttb_00
mttb_01
Despite being close enough, the Box cast would often fail depending on the angle. To compensate for this, I added the Sphere cast.
I considered creating a new Action for this, but since the logic is almost identical to the MeleeAction, I decided to only use the Sphere cast when the Radius value is set.

3.

If there are multiple targets that are checked for collisions, I've added the GetTotalDamage API to IDamagable to select the most damaged target. I felt that this prioritization was a good one, whether the MeleeAction is attack or recovery.
Note that I kept the ability to prioritize targets with hint targets for targeting.

Issue Number(s)

MTTB-409
https://jira.unity3d.com/browse/MTTB-409

Contribution checklist

  • Tests have been added for boss room and/or utilities pack
  • Release notes have been added to the project changelog file and/or package changelog file
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • JIRA ticket ID is in the PR title or at least one commit message
  • Include the ticket ID number within the body message of the PR to create a hyperlink
  • An Index entry has been added in readme.md if applicable