T
tomocska602
Guest
Hello guys!
How can I make an object (in this case a spike) throw back my player with a specified force?
I'd like this to work like this:
When my player object hits a spike from any direction, apply a force contrary to the direction the player is hitting the spike. Also, I must make sure my player only loses 1 health.
Any tips how could I achieve this? I got to the point where my player hits the spike from the top and succesfully bounces back, but sometimes it takes away 2 or more health :/
How can I make an object (in this case a spike) throw back my player with a specified force?
I'd like this to work like this:
When my player object hits a spike from any direction, apply a force contrary to the direction the player is hitting the spike. Also, I must make sure my player only loses 1 health.
Any tips how could I achieve this? I got to the point where my player hits the spike from the top and succesfully bounces back, but sometimes it takes away 2 or more health :/