Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local yaw = 0
- local side = "left"
- local amount = 1
- hook.Add("CalcView", "SPIN", function(ply, origin, angles, fov)
- local focus_point = ply:GetEyeTraceNoCursor().HitPos
- if side == "left" then
- origin = origin + angles:Right() * amount
- side = "right"
- elseif side == "right" then
- origin = origin - angles:Right() * amount
- side = "up"
- elseif side == "up" then
- origin = origin + angles:Up() * amount
- side = "down"
- elseif side == "down" then
- origin = origin - angles:Up() * amount
- side = "left"
- end
- angles = (focus_point - origin):Angle()
- return {
- origin = origin,
- angles = angles,
- }
- end)
Advertisement
Add Comment
Please, Sign In to add comment