Hi guys,
I’m working on a top-down shooter, and I ran into a problem. I use this player character for my game:
As you can see, the character holds his weapons on his right side. That means if I use centre mass as origin, the bullet will not hit the crosshair, but rather a few pixels right of it.
I want the player to turn like the following:
(the red dot is the origin).
Despite the crosshair always having the same angle to the origin, the player should turn according to the distance of the crosshair, so the gun aims properly.
I’m not suggesting rotating round the gun because, yes, that would look weird. I’m suggesting just using that to place the bullet and firing it straight out from there, and not worry so much about rotating the player.
I think it’d look weird if the player rotates when the enemy is moving in closer in a straight line. Real life behaviour is to move the arm/hand/gun to point at the target, and not swivel you body round while keeping your arm at a fixed angle to your body.
Well, if you aim with one eye, rotate the firearm and your shoulders and eye don’t follow, your targeting will be off, and the recoil may be harsh, but we’re sidetracking.
Either way, it seems there’ll be no ideal solution here unless the head is a separate sprite to follow the crosshair too.
I use separate head in my game already and I think I found good solution, but I have to implement it.
I want to use separate body parts like arms, forearms, hands and guns for aiming animation. It will be much more complex, but I think the results are worth this additional work.