playMaker

Author Topic: Falling front & falling back  (Read 588 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Falling front & falling back
« on: March 17, 2021, 03:20:10 PM »
hi,

i have a player. if obstacle hit him on back, he should fall front.
if obstacle hit him on front, he should fall back.

i have both animations. not sure how to do it perfectly.

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Falling front & falling back
« Reply #1 on: March 17, 2021, 06:38:33 PM »
Hi.
in our 2d game i get the position of the player and the hit position from the for example (bullet) to know if hit from left or right.
Then i check the rotation of the player to check which side hes facing.