Push an object behind itself with No RigidBody
Hi there, i'm trying to create an enemy that catches the player, and this one can escape repeatedly pressing a button... Then, i want to push the enemy behind himself when the player can escape from him, but i'm not using Rigidbody in the enemy (only NavMeshAgent) and i can't do it... i'm trying so hard!
Anyone could help me?
Break it into parts. If pushing something away from you is the problem, focus on that. Just set things up so a box starts on top of you, clicking once pushes it away, and test.
Look up ways to move objects -- how does it move towards you? You can just do that backwards to move away. Or you can turn rigidbodies on/off or add/remove them if you really want a rigidbody-like shove. Once you get just a nice push on a box, you can figure out how to combine that with the rest (like how it stops being pushed and chases you again.)
For clicking a lot, test just that -- make a $$anonymous$$i game where you have to click 6 times quickly to win, or move left/right/left ... with a progress bar. Once it feels nice, add it into your main project as escaping.
Your answer
![](https://koobas.hobune.stream/wayback/20220612094415im_/https://answers.unity.com/themes/thub/images/avi.jpg)