Answer the question
In order to leave comments, you need to log in
How to make a rebound? When taking damage?
Hello again !
Here asked a question, but he and did not dare.
You need to dodge when taking damage.
The movement is implemented through Velocity , I was told that it is necessary to disable Velocity at the time of taking damage so that the character can be moved along X. But I don't know how to do it.
if (collision.gameObject.tag == "Vrag")
{
gameObject.GetComponent<Rigidbody2D>().AddForce(transform.up * direction * powerForce + transform.right * direction * powerForce, ForceMode2D.Impulse);
TakeDamagee();
hpText.text = ((int)hp).ToString();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question