Creating Particles Infront of Player's View

Hello again Facepunch.
I am currently making a SWEP, and I want to create particles in-front of the player’s view, yet I do not know how to do so.
The custom particle is in its own lua file. I’ve been looking for hours but can’t seem to figure this out.

I’ve tried using the following:
[lua]if (SERVER) then
local particle = EffectData()
But I don’t think that’s really what I want, plus it doesn’t work with my viewmodel as it has no attachments. That’s okay though since I don’t really want the particles coming from the model itself.
I’m trying to go for what is seen here:

Advice anyone? Detailed solutions are heavily appreciated.
(I’m hoping to get a similar result to the eating effect seen in the Popcorn SWEP.)

Got it guys, got impatient as I had to wait a few hours before I could create this post. :shh:

Don’t bump after 3 hours please. Wait at least a day or so.

Bump, any ideas?

GetEyePos and GetAimVector?

That could be a good start. I should try that.

My goal is to get an eating effect like the Popcorn SWEP.
Unfortunately neither of those seem to fit anywhere. I think EffectData is really set on using Attachments which my weapon model doesn’t have.
Hopefully somebody can help me figure out another way or rendering custom particles without model attachments being required.

Why do you even need to use a particle for that? That ‘particle’ looks just like square cutouts of the steak’s texture, which you could replicate through

render.SetScissorRect and

surface.DrawTexturedRect, or

surface.DrawTexturedRectUV, along with a simple physics simulation to make it go in the air a little before falling back down.

EDIT: I know you’re trying to get a particle system to work, but it’s always an option. It’s probably similar to what Minecraft actually does internally

Thanks for the response, I appreciate it, but maybe I wasn’t as specific as I should’ve been. I wish to render custom particles using a .vtf file, as opposed to chopping the model itself into particles.

Also, rather than suggest a solution or point me in the right direction, TylerB goes for the triple “dumb” rating. Thank you for being helpful. :quotes:

The “proper” way would be to make a particle effect but literally nobody knows how to do that and if you do manage to find someone who does in the mapping or modeling section they’ll tell you to figure it out themselves because “I had to do it, why shouldn’t you”. But maybe I’m just my personal experience.

Another way I can think of doing this is maybe with an animated vtf that plays the food particle on a loop. You could make that vtf appear while the food is being eaten.

So custom particles are just one of those poorly-documented topics huh? Well I’ll keep this post up for a little longer but I don’t expect a solid answer anymore, hopefully someone can suggest something but thanks for letting me know your experience.

The VTF overlay (if that’s what you’ve suggested) could be neat but I’m looking to render physical particles visible by others. Thank you for the idea though.

Then make the particle show for everyone when a player reloads.