Hi Everyone,

Making a mod with a few others that has walkwalking - the actual physical
walking along walls part has been implemented.

Basically it uses the normal of the surface you are walking on and the
viewing direction of the player to construct the correct 'right' and
'forward' unit vectors, so that the players movement is constrained to the
surface (using the cross product).

The problem I am having now is that I want to change the camera angle to
face the "forward" direction of the surface. I have hooked up the
server-client code so that I can directly change the camera angle however my
vector cross product calculations screw up because I am now changing the
camera viewing angle and then using it to make a calculation which changes
it again - e.g. circular madness.

Thus I am sure it is possible because you see it done all of the time - but
is there a way to construct at least one right angled vector from just one
vector? The cross product requires 2 vectors, so I played with arbitrary
vectors and rotations to the original direction of the normal to the surface
- however I get problems where one wall's normal will eventually be
co-linear to the vector I have chosen (which results in a zero vector).

So I am not sure I really explained the problem all that well - I can go
into more detail if anyone doesn't understand.

Thanks

Mitchel
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to