• Get an effect to face forwards using Eff:SetAngles()
    1 replies, posted
need to get a muzzleflash effect to face forwards. [CODE]local effectdata = EffectData() ---test? effectdata:SetOrigin( self:GetPos() ) --print(self:GetAngles()) effectdata:SetAngles( self:GetAngles()) --print(self:GetAngles():Forward()) effectdata:SetScale( 1 ) util.Effect( "MuzzleEffect", effectdata )[/CODE] this above makes the flash face some constant direction, rather than towards the target, which looks really weird. self:GetAngles():Forward() returns a vector rather than an angle, so i can't use that. ??
Just set the SetAngles to an angle that faces towards the target then? ( targetpos - muzzlepos ):Angle()
Sorry, you need to Log In to post a reply to this thread.