- Home /
How to create a laser (With colliders) for a weapon?
Hello, i'm nathan. i need to know how to build a laser for my weapon. i used trails(Particle emitter), but Guess what? no collision. i can fire at someone but am not able to create a script to negate health, as there are nothing to Negate with. any how idea to create a laser beam with collision that look the least bit effective and not too much processing intensive?
tah
Answer by Meltdown · Jan 15, 2011 at 06:13 PM
The 3d Platformer tutorial with Lerpz explains how to create a laser field that moves up and down and causes damage when the player walks through it.
This should be exactly what you need to get started.
http://unity3d.com/support/resources/tutorials/3d-platform-game
Answer by Simone · Dec 02, 2010 at 02:12 PM
Hello Nathan, you laser follows a straight pattern? if so, you can test for collision using a Raycast that follows the same straight path of the laser.
Hope this helps, Simone
Answer by Thom Denick · Jan 15, 2011 at 06:29 PM
Additionally the FPS tutorial will show you how to do the raycasting collision Simone mentioned:
http://unity3d.com/support/resources/tutorials/fpstutorial.html
Your answer
Follow this Question
Related Questions
How Can One Collider Recognize Contact With Another? 0 Answers
Creating laser gun effect. 1 Answer
How can I make a Laser Burn on the floor? 2 Answers
laser simulation with line render and colliders 0 Answers
Colliding Melee Weapons 2 Answers