Modify movement to a different angle rather then the viewangles

Hi I’m trying to make a simple movement configuration script that uses its own angle rather then the view angle.
E.G. the player is looking one way, but you move in a different direction.
If any of you have ever played DayZ its kinda like when you hold the ALT key and you have freelook, but it also makes your movement in that direction but does not change your players direction.
I have been stuck on this for a few hours now, so if anyone could help me out with some code that would be great!

Use calcview and http://wiki.garrysmod.com/page/GM/InputMouseApply

Are you aware of what calcview does? This does not change movement it changes the view.

And that’s why i gave you inputmouseapply link

No no… I think he’s talking about this: http://wiki.garrysmod.com/page/GM/Move

I tried to hook SetupMove and then use mv:SetMoveAngles but it did not work. Any way to do this entirely clientside?
EDIT: also tried hooking to Move and FinishMove, did not work.

You can easily acheive this with those two hooks.

This is the most correct reply in this thread. The idea is to simulate view rotation yourself using GM:InputMouseApply, and use the resulting “alternate eye angles” in GM:CalcView. This way you can freely look around without actually changing your true eye angles.

If you want to change movement as well, use GM:CreateMove and modify the forward move, side move and view angles from the user command object. Depending on what you want to do exactly, expect to use a bit of angle math.

Any hook regarding CMoveData cannot be accessed purely clientside. I already have a CreateMove hook so using InputMouseApply as well isn’t very useful as I can just use GetMouseX and GetMouseY from CUserCmd.