Download

[Request] Start to finish weapon tutorial

I want to make a weapon that shoots bullets, not spheres, and I can’t seem to figure it out. I looked for a tutorial but strangely enough, can’t find a single one. Is there one out there?

Edit: Preferably a weapon that uses a generic base weapon class.

You can replace the material in the base projectile blueprint with whatever you’d like. I created a quick bullet in blender and imported it over to replace the ball. Just check the components of the blueprint and you’ll see where the static mesh is attached.

The thing that had me stumped for a quick minute was the fact that the scaling on the ball was at like, .1… so remember that when you import your own static mesh to replace it :slight_smile:

Here’s a couple tutorials that helped me quite a bit as well:

https://youtube.com/watch?v=1aSdzw5zPtg

wouldn’t let me post both videos in one reply…

https://www.youtube.com/watch?v=s56H-C0iFDw

What I mean is, I don’t think that creating a mesh and physics collision component for each bullet is efficient. How do other games do it? I was thinking they did something like having a billboard instead of a mesh and a very simplified collision handler (which I don’t know how to make).

I think the standard method is raycasting for bullets.

It’s actually not. Or rather, it depends on the game. Games like Battlefield, Arma etc. where realism is needed, use a projectile for each bullet, so gravity is applied, and the bullet doesn’t hit the target instantly. If you don’t need that realism just use traces, they are fine then.

How would I go about making a bullet that uses raycasting? Does it have to be in C++? Would it be best to have it all implemented in C++ for speed? Thanks for the help so far guys, it really is appreciated.