Search Unity

Noob Question: What's the best way to shoot projectiles from guns?

Discussion in 'VR' started by kukewilly, Mar 17, 2019.

  1. kukewilly

    kukewilly

    Joined:
    Jan 3, 2019
    Posts:
    46
    Hey All,

    Designing a GDD and asset/coding chart for a VR FPS game. I'm not really sure what the typical way is for shooting projectiles from guns... Do developers usually trigger particle systems or instantiate actual objects at the end of the gun? How do they manage players getting hit by them? Is it a collision trigger or do they use ray casting?

    My guns will typically be shooting beams and lasers.

    Thanks!

    Kukewilly
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    If you're shooting beams and lasers, then you will certainly detect hits via raycasting. As for drawing them, there are lots of ways to do that, including this nifty asset I stumbled upon recently.