Friday, April 6, 2018

unity - How do I set up a bullet to fire towards the mouse pointer?


I am making an FPS, in Unity. I have a player with a gun, and I have a bullet prefab. I changed the mouse pointer to look like a crosshair, but I don't know how to place the bullet where the crosshair is aiming.



The player movement is on the x and z axis. I have done lots of research on the Internet, and couldn't find anything suitable; most of what I found, I could not understand enough to change it according to my needs.


How do I set up a bullet to fire towards the mouse pointer?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...