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

Get help using Construct 2

Post » Fri Dec 12, 2014 6:04 pm

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.
You do not have the required permissions to view the files attached to this post.
B
10
S
5
Posts: 220
Reputation: 1,464

Post » Fri Dec 12, 2014 8:00 pm

I got it!

move the origin of cross hair up. Then pin the cross hair to the Hero and pin based on angle only.
B
10
S
5
Posts: 220
Reputation: 1,464


Return to How do I....?

Who is online

Users browsing this forum: rayolf and 34 guests