How do I fix my bullet angle?

  • My bullets when i face left shoot backwards. Every time I shoot bullets, facing left, after the second shot they all reverse angle. Even if I shoot a bullet while facing right then shoot facing left, they still reverse direction. The only time my bullets shoot normally is when I'm facing towards the right.

    Video here:

  • The way I have it set up for my own purposes is:

    On Z pressed:

    -> Create object <bullet> at player.LayerNumber (player.X, player.Y)

    -> Set <bullet> angle of motion to player.Angle degrees

    The bolded part is what allows the bullet to have the correct angle and not always shoot to the right. You should be able to apply this to yours.

    If that doesn't work (or if you've already done it like that), would you mind posting your .capx file?

  • My capx file below

    http://www.filedropper.com/wonkybullets

    What do you mean by create bullet? does it work if i spawn it from another object?

    Thanks for the feedback!

  • Yes, but it looks like your spawning method works as well (since you're spawning it at an image point at a gun).

    filedropper.com/bullets Is this what you were looking for? I modified a couple of things and set the bullet's angle of motion instead of what you had before (note: the way you had it simply changed the angle of the graphic - it did nothing to the direction of the bullet itself).

  • WOW thanks SNN! I need to review this change, maybe I'll learn something for once lol. It feels a bit wrong to just take your changes, so I'll try never to make this mistake again.

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OHHH I see what you did there

    So i needed to take advantage of the bullet behavior on the sprite, Instead I tried to change the sprite graphics shot direction.

    Sometimes i forget.

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