Hello,
So i have been getting weapon models of the workshop and turning them in to working SWEPS.
But I'm having issues with weapon effect like weapon tracers and weapon muzzle flashes not having the correct starting position.
Is there away i can manual set where the effect starts from?
Image:
https://imgur.com/a/WhkutDe
Am I able to get an example on how this is done?
Sorry to be a pain.
The model is missing the muzzleflash position, I think.
No it has one.
The effect are coming out of where the models is but i have just DrawWorldModel manual and set it position in the hands
No it has one.
I have used SWEP:DrawWorldModel to position it correctly.
Without that the weapon show where the effect come out from.
You have problem with FireBullet, not the effect itself
How so?
You need to show your code to check that. Or find yourself self:FireBullet in the code and check `start`
bullet.Src = self:GetOwner():GetShootPos()
You need to correct ShootPos
Yeah that was the first thing I tried doing.
No luck there.
Hello,
This is what i have so far for the muzzle_flash affect but its not perfect.
How can i position it better?
also is there a way to hide it from the client?
function GetOurAttachment(ply)
local ID = ply:LookupAttachment("anim_attachment_RH")
return ply:GetAttachment( ID )
end
PrecacheParticleSystem( "muzzle_machinegun" );
function SWEP:ShootBullet( dmg, recoil, numbul, cone )
local offsetVec = Vector( 26, 0, 5 )
local offsetAng = Angle( 0, 0, 0 )
local vPoint = GetOurAttachment(self.Owner).Pos
local aPoint = GetOurAttachment(self.Owner).Ang
local newPos, newAng = LocalToWorld( offsetVec, offsetAng, vPoint, aPoint )
ParticleEffect( "muzzle_machinegun", newPos, newAng, self.Owner )
Sorry, you need to Log In to post a reply to this thread.