how do i implement a knock back system using the physics behavior in construct

0 favourites
  • 9 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • i am currently trying to implement a knock back effect using the physics impulse event although i set it up as if the player x and y was less than the mob apply impulse towards position of the player -30 each it aint working did the opposite if it was greater as well anyone can help with this i cant use the 8 movments knock back thing because i got an event that sets the angle towards the position of the mouse every tick

  • You should add some punctuation marks, it's difficult to understand you.

    If you are using Physics behavior, you should avoid setting object angle directly.

  • hmmmmmmmmm guess i will add a screen shot to be more precise what did i do wrong here should be understandable enough as a question

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can use Apply Impulse At Angle angle(mob.x, mob.y, self.x, self.y)

    Also, using Physics and MoveTo with the same object may cause problems.

  • sadly it didnt work there is no knock back what so ever i didnt think that making a knock back effect this is how its looking rn

    is there any other way to implement a knock back effect other than using physics

  • Did you try my suggestion??

    Player on Collision with mob
    Player Apply Impulse 30 At Angle angle(mob.x, mob.y, self.x, self.y)
    
  • im afraid your suggestion didnt work sadly i tried switching the movement behavior to bullet as well but it still didnt work im gonna try the 8 direction one i only have 1 issue rn with the file you sent me the its the knockback force i dont have anything that resembles it in my project sadly i tried to switch it up with numbers to see if it will work but it didnt is the knock back issue at hand because of the behaviors or what frankly i didnt expect knock back to be such a pain to add if you want i can send you the project if you wanna check if something is wrong in it since the project is only a learning experience for me rn i dont plan to make it into a game

  • It's not a pain to add. If you are using physics - apply impulse at angle away from the enemy. If you are using 8direction - set X and Y velocity. I posted both examples in this thread.

  • i made another project and the 8 movements method worked in it but didnt work in my project somehow thank you for suggesting it the problem was with my project not your method

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)