- Home /
Throw the Player from the Enemy away
Hi my english isn't so good but I have a Question. When my Player jumps on the Enemy, I will that the Enemy throw the Player after 2 seconds away. How can I make it, that the Enemy throw the Player away?
Well that would all depend on the genre of your game and the dimendison such as is it 2d or 3d?
Ok but i need it to be more specific, for example is it a platformer, is it a 2d or 3d game? Just the usual common questions that can be helpful for solving your problem.
Answer by Kiwasi · Aug 08, 2014 at 03:05 AM
Generic steps (since your question is very generic)
Detect when the player jumps on the enemy (OnTriggerEnter may work)
Wait for two seconds (Coroutines will help here, you can also build a custom timer)
Move the player away from the enemy (transfom.Translate or rigidbody.AddForce)