I added a demise animation amongst another issues in case of demise. However after taking part in it the participant is airborne, so I would want to alter the pivot. However I am questioning if this cannot be achieved with some code
The participant’s demise is then dealt with by this code:
personal void Die()
{
Debug.Log(gameObject.identify + " died.");
isDead = true;
isRegenerating = false;
//gameObject.SetActive(false);
participant.AnimController.SetDeathState();
WorldController.Occasion.isGameOver = true;
if (WorldController.Occasion.ghostModerEnabled)
{
WorldController.Occasion.isGhostMode = true;
}
//Destroy(gameObject);
}
I initially thought it could be sufficient to govern the collider on the participant to put down together with the animation so the participant stays mendacity within the air, however that does not actually work
Edit:
0
The collider within the occasion of demise doesn’t precisely match the place of the participant’s physique. Total, it seems to be like this.
The participant’s character is made up of an empty object containing the character mannequin from the mixamo. All scripts and the capsule collider broadcast on the empty object presenting the participant. I do know the colliders ought to look totally different. However it’s one thing I have not addressed but. In case of demise, the capsule collider stays in its authentic place. I attempted making use of the collider to the character mannequin as nicely, however the state of affairs is mainly the identical.