Hi,

I have a vector along a surface. Because I derive it from a normal vector, it’s always facing in the same direction. I need to change it to go in the direction the player is facing, but I’m having trouble getting it to work.

Here’s a picture:

What I have right now is this (wallVector is the vector along the wall):

```
bool wallErrorX = (camera.transform.forward.x >= 0 && wallVector.x <= 0) || (camera.transform.forward.x <= 0 && wallVector.x >= 0);
bool wallErrorZ = (camera.transform.forward.z >= 0 && wallVector.z <= 0) || (camera.transform.forward.z <= 0 && wallVector.z >= 0);
if (wallErrorX)
{
wallVector.x *= -1;
}
if (wallErrorZ)
{
wallVector.z *= -1;
}
```

This works fine for any vectors at 90 degrees, but not for anything else.

Hopefully someone can help. Thanks!