- Home /
Player Knockback Without Physics
Hello,
I'm looking to make a slight knockback effect on the enemies in my 2D game when they take damage. The thing is, I don't want the player and the enemies to have full physics interactions. Currently, I can get it to work with a rigidbody2D on the enemies, but when the player walks into the enemy, physics takes over and the enemy rotates around and moves. I believe I need to use the kinematic option on the Rigidbody2D, but I am unsure. Any help would be great.
Thank you.
(UPDATE): I went ahead and kept the dynamic 2D rigidbody and just increased the mass to 1000. This works, it just feels kinda wrong. I need a force of 10000 in my knockback function to get the right effect and these bloated numbers don't feel right. If anyone has a more elegant solution or any other ideas, I'd love the hear them.
Your answer
Follow this Question
Related Questions
How do i stop rigidbody2D bounce 1 Answer
Is it ok to use Linear Drag and/or Mass to make an object immovable? 2 Answers
GameObject not detecting collision with floor 0 Answers
How can I increase or decrease jump speed while keeping the jump arc the same? 1 Answer
Change a specific Gameobjects rigidbody gravity to horizontal (left) 1 Answer