• Turret SWEP - Spawning correctly to the owners view/eye angles?
    1 replies, posted
I need someone to help me figure out how to set the turrets direction to the direction the owner is looking, I still need it to stand on the ground though so it doesnt fall over. Help would be appreciated! [lua] local SpawnPos = tr.HitPos + tr.HitNormal*2 if util.PointContents(SpawnPos) & CONTENTS_SOLID > 0 then return false end local ang = tr.HitNormal:Angle() ang.y = ang.y + Angle(0,LocalPlayer():EyeAngles().y,0)//Wrong local ply = self.Owner local ent = ents.Create("npc_turret_floor") ent:SetPos(SpawnPos) ent:SetAngles(ang) ent:SetOwner(ply) [/lua]
I think there is a function that is called SetPoseParamater or something like that I think that's what you need.
Sorry, you need to Log In to post a reply to this thread.