I have this weapon model that picks an enemy mesh on left mouse click and damages it.
How would I go about having a “ray” effect go along with the shot ?
The best example I can give is this :
I have this weapon model that picks an enemy mesh on left mouse click and damages it.
How would I go about having a “ray” effect go along with the shot ?
The best example I can give is this :
You could make a plane between two points, which you then put a texture or shader on:
https://playground.babylonjs.com/#UK6WTT#2
Interestingly, the first shader I found on shadertoy was a port from an Unreal-inspired spark shader:
https://www.shadertoy.com/view/4scGWj
UT lightning gun footage:
I implemented in my game !
Thank you so much for putting me in the right direction.
I suppose other gunflare effects could be done in the same fashion.