I’m making a topdown and if my player collides with the enemy sprite… how do i make the player bounce back xx distance? (i use the word bounce lightly as not to confuse with bounce behaviour)
Add to Player an instant force to enemy.X() - 32 p/s on X axis and enemy.X() - 32 p/s on Y axis
That didn’t quite work as I’d hoped.I guess I just need the enemy sprite to force back on itself by distance. I have played with forces but haven’t quite got there yet.
Hi again,
This is tough to explain without screenshots that I can reference, but essentially you need to give the player the same force as the enemy and rotate the angle by 180 degrees.
If not, you can also compare the position of the player and the enemy but that’s probably less flexible.
If you give screenshot of how you currently move the enemy, it should be easier to help you.