Hi everyone,
As part of a university project, some of my friends and I are doing a single-player mod for hl2.
Part of that mod is to implement wallwalking (like in dystopia or ballmen). We have successfully implemented the actual wall-walking part - the difficulty now is adjusting the camera so that it points parallel to the surface the player is walking on. E.g. the player is walking along the ground and then switches to walking up the wall and the camera needs to be adjusted accordingly so it points in the right direction.
I have narrowed down the best function to accomplish this (keeping in mind that the main reason for changing the viewpoint of the camera is so that the player can walk upside down without the 89 degrees pitch restriction) to CalcPlayerView in c_baseplayer on the client.
Long story short, I calculate the necessary information (the direction forward but parallel to the wall) in gamemovement.cpp and in a wallwalking brushentity.
The difficulty I have now is that that information needs to be transported from the server to the client so that I can adjust the camera angle whilst wallwalking.
Sorry for the essay- I figured anyone who knows how to fix this problem would want a decent amount of information. Indeed if there is a way of accomplishing this goal without resorting to server to client messages then by all means please share
I have tried a variety of ways to this but now I am thoroughly confused, it seems to be possible, but I am stuck.
Any ideas?
Thanks in advance
