• Players angle same as entities angle
    2 replies, posted
Hello, I've been trying recently to set the players angle the same as the entities angles, but it doesn't seem to be working, this is what I have tried: [CODE]local ent1 = "bed" for k, v in pairs( ents.FindByClass( ent1 ) ) do pos = v:GetPos() ang = v:GetAngles() ply:SetPos( pos ) ply:SetEyeAngles( ang ) end[/CODE] But this doesn't seem to work, position works fine though.
:snip: misread
SetEyeAngles affect only on direction where you look (Shooting, opening doors, etc.), but actually don't change model angle. I think you're looking for ply: SetRenderAngles (Angle on) or CUserCmd: SetViewAngles (Angle viewAngle). SetViewAngles have a lot of caveats because affect on the direction of your movement.
Sorry, you need to Log In to post a reply to this thread.