Third person shooter (94380)

I have a third person shooter on my game.
He moves properly,But he fires randomly.How to set him fire only on the center of the screen??

please let me know where should I insert or modify the code.I’m using java script.

Unfortunately I think Clamp will work only on the atlas' limits, not inside.

I've already got it set to clamp. You can see my full texture configuration in the second screenshot. Thanks!

1 Answer

1

Problem with TPS is that your center of the screen means aiming at a differebt spot for your charqcter depending on depth.

You could use a raycast to get the point where you are aiming and then make the charqcter aim at the spot

Sorry for the vague answer but that is all I can think of from the question.