- Home /
How to make enemy`s gun shoot directly on player and its allies from some distance.
I have and 3d model of enemy with gun and its animation I want to make that the enemy`s gun shoot directly on player from further distance at a place. And yes it fire my player`s allies soldier, also it fire on player and its allies by raycasting and ray directly hits the player and its allies. Please help me! Thanks in advance.
Can you please clarify your problem? Your shot is working okay, your raycast hits the target, but your model is facing the wrong direction?
Hello @frankslater my problem is that when my enemy take his gun then he exactly and directly fire on player`s head and as the ray hit the player`s head then automatically player`s health reduces. I hope you`re know understanding my problem clearly.
Answer by tormentoarmagedoom · Sep 22, 2017 at 07:46 AM
Good day @AshwinTheGammer !
What is your problem exactly? I see you know need to use Raycasting, so if you know how to use Raycasting, I dont get what you need to know.
Hello @tormentoarmagedoom my problem is exactly is this when my enemy take his gun then he directly fire from his gun to player`s head by ray and as ray hit the player`s head then automatically player`s health reduce. I hope you`re know understanding my question I am noob to unity 3d scripting and currently learning basic scripting. Help me thanks!
Your answer
Follow this Question
Related Questions
Making bullet holes in enemies. 1 Answer
fps shooting enemy 1 Answer
How to make a Raycast enemy? 0 Answers
How can I make a Grapple Gun work with the Character Controller? 1 Answer
enemy raycast to detect player 1 Answer