How to get bullet to shoot correctly in the direction its going?

0 favourites
  • 9 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • So im having an issue in my game when my player shoots in either the left or right direction, the bullets are side ways and are not shooting straight. It shoots correctly shooting up or down but I can't get it to shoot correctly in the correct angle for the left and right direction.

    shooting up.

    shooting down.

    shooting left.

    shooting right.

    For the events, I've set the bullet angle of motion in the angle the player is going. But it just shoots side ways. It's shooting in the right direction but not the right angle. Can someone help me figure out how to get the bullets to shoot correctly in the directions its shooting in?

    Here's the link.

    dropbox.com/s/v98asqv64zxsysk/GameZoneTest.c3p

  • Set "Set angle=Yes" in Bullet properties (on the left bar)

    Also, the default angle for sprites in Construct is 0 degrees, which is left-to-right. Make sure your images in sprites are oriented this way, it will make everything easier for you in the future.

    If your ship has the same image when moving up/down/left/right, then you don't need different animations. I fixed and optimized your project, take a look:

    dropbox.com/s/ob79ykr4n0rmfyn/GameZoneTest2.c3p

  • Oh wow, thanks a lot man! It's more simplified and cleaner now. I really appreciate this and your advice.

  • Hmmm... a weird thing happened. Now that the left and right is shooting correctly, the up and down is now shooting sideways. I've made sure the angels are at 0 and the the bullet angle is "yes".

  • Did you rotate the image in Bullet sprite? Compare everything with my version.

  • Yes , i did everything exact. I did a whole new Test and followed yours step by step and it works. It's something in my game that is causing it to not shoot correctly.

  • Only 3 things can cause this problem - check image orientation in the sprite, check "Set angle" parameter on Bullet behavior, and check the action in event sheet.

  • If you have more than 1 instance of bullet in your project, make sure that ALL bullet instances that are in your project have Set angle property enabled. To do this - find your bullet object on the right in Project tab, right click and choose Select all in project then set property Set angle to true

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you simple games! that was it! I couldn't find all the bullet instances and didn't see them. But now it works! Thank yall so much for yall help!

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