May sound weird, but i need a player and an enemy to collide without affecting the player velocity
May sound weird, but i need a player and an enemy to collide without affecting the player velocity. My damage system is currently working on how quick two colliders collide, the more quick = the more damage. but i basically need my player to go through the enemy. Does someone have an idea ?
current code to calculate hit colliding speed :
public void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Enemy")){ Debug.Log("Collision force is " + collision.relativeVelocity.magnitude);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613052229im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Bounce, gravity and velocity 1 Answer
Why Does Bounciness Affects Rigidbody Velocity? (SOLVED) 0 Answers
C# overriding past velocity 0 Answers