- Home /
Beginner to raycasting: making a gun
I am not new to Unity, but I am new to raycasting. I am trying to make a pistol, but have no idea where to start. Any help?
Answer by CarlLawl · May 26, 2011 at 02:43 PM
Check out this, I hope it helps. http://www.youtube.com/watch?v=3L8eaoyZ0Go
You'll probably be using Force and collisions. So on mouse click or button press it adds force in the direction you're looking, if it collides with enemy/player deduct health and destroy the bullet, if it hits a wall just destroy it, if it doesnt hit anything within set amount of time destroy it
the actual gun itself is just a model.
good luck!
Your answer
Follow this Question
Related Questions
Raycast help 1 Answer
Raycast gun 2 Answers
Do raycasts only collide with colliders or can I detect a hit through something else? 2 Answers
Particle Instantiation problem. 0 Answers
Is object at least partly visible? 1 Answer