How do I Shoot to The Center of Crosshair in Top Down Game

0 favourites
  • 2 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • Hello guys, I need some help.

    I'm making a simple top down shooter. The Hero/player will rotate according to the position of the mouse. I set the origin point on his head. So he will rotate nicely.

    The problem is:

    The gun's position is not on the center of his body. It's on his right side, pointing directly straight to the front.

    I change the mouse cursor to become a cross hair. As the result If I shoot, the bullet is not flying to the center of the cross hair.

    How should I solve this?

    If I change the origin point of the Hero so it will in line with the gun, that fixes it, but the Hero will rotate strangely.

    If I change the poisition of image point of the Hero, that fixes it, but it doesnt look natural. Cos the bullet doesn't fly from the mouth of the gun.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got it!

    move the origin of cross hair up. Then pin the cross hair to the Hero and pin based on angle only.

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