Hey GiL, I saw you post in the Unity Forum that you can use the Explosion Rigidbodies for knockback effect. I was curious, so I tried it, with no luck.
In my attack event, I do it in the following order:
Event Setting --- Spawn Sparks ---- Destroy Sparks --- Spawn Bullets --- Remove Bullets from Inventory --- Activate Damage Dealer --- Change Bullet's Position --- Play Gun Sound --- Explosion Rigidbody --- Destroy Bullets.
In the Explosion Rigidbody here are the settings:
Actor is Target
Force mode is Force of type value with a value of 1000
Explosion Radius is type Value with a value of 10
Upwards Modifier is type Value with a value of 0
Explosion Position's Use Object is enable and the Actor is set to User.
In my enemy's Rigidbody component, I disable the Freeze Rotation XYZ.
I want to create an effect similar to if I shoot at an enemy and hit, the enemy will be push back a little. Am I missing something?
Alternatively you can also use the Change Position step.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It doesn't work at all, no matter if I put the Actor to Target or User.
And I also try the Change Position as you mention and it won't work either. If I use the User as Actor, my character will be push back everything I shoot a gun, but I want the enemy to move back whenever I damage them. I try making the USER as target, but that does nothing.
E.g. in real time battles, the enemies are also always moving (e.g. through move AI or actions of their own), which can counteract your knockback ...
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Edit: I did some testing and it seems without a Move AI and Gravity enabled in rigid body the combatant falls through the terrain. I guess I'm not sure what's going on, but it seems disabling his move AI is making him not collide with the terrain.
I'll take a look at knockbacks, there should be an easy way to achieve that, maybe an extra event step :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And GiL, that would be fantastic!