• Creating a toggleable third person shoulder view with a CalcView hook
    1 replies, posted
[t]http://oi41.tinypic.com/108h6i0.jpg[/t] I want to create a third person shoulder view like the one shown above, toggleable via a convar. How would I do this with a CalcView hook(or whatever the best method would be)? Any help is appreciated.
Work out a good offset from the players head. Then rotate it around the players eye angles using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Vector/Rotate]Vector:Rotate[/url]. Add the result to the players EyePos and set that as the origin. At this point you'll have thirdperson but when you shoot it won't be accurate. You'll need to do a trace from the players eyes and subtract that [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/GetShootPos]Player:GetShootPos[/url] plus the offset that you worked out earlier, then convert that to an angle.
Sorry, you need to Log In to post a reply to this thread.