How do shoot grenades on both direction

0 favourites
  • 4 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • I learned to create a physics behavior to shoot grenades but I can only do it facing right.

  • Hey Vahn,

    I could help you more easily if you tell me how you are currently aplying force to the grenades.

    Are you using "apply force at angle" for example?

    If you are using "apply force at angle" you could check if you are facing left and than do the same function but apply force at the angle you are using to throw to the right, but -180 to throw in the opposite direction.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Fedca. Thank you for the tip! I was using "apply force at an angle". I figured to use opposite angles when the player is facing the other way. That is the same method for shooting bullets, right?

  • glad I could help!

    I assume you want the bullets to just fly in a straight line, for that I wouldn't suggest using a physics object as they need alot of calculation from the hardware.

    Instead you could use the "bullet behavior" and set "angle of motion" to the direction you are shooting or to the mouse position if you are using the mouse to aim.

    here a little sample how to use mouse position:

    set "bullet" angle of motion = angle(player.x,player.y,mouse.x,mouse.y)

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