Please help, iam totally frustrated, cannot move&look character to camera direction.

MyCharacter.transform.rotation = Quaternion.Euler(0,Camera.main.transform.eulerAngles.y,0);

MyCharacter.transform.Translate(MyCharacter.transform.forward * speed);

result = character looking at camera direction, but moving to somewhere else. Please help.

Right now, i am using the following hack, every frame:

MyCharacter.transform.rotation = Quaternion.Euler(0,0,0);
MyCharacter.transform.Translate(Camera.main.transform.forward * speed);
MyCharacter.transform.rotation = Quaternion.Euler(0,Camera.main.transform.eulerAngles.y,0);

Thus, my character translate to camera direction correctly, only if my character have angles (0,0,0). Meaning that, MyCharacter.transform.forward - is totally broken. I dont understand why.

I found the problem.
The problem is “transform.Translate” function. Its totally broken.

If i am using following code:

MyCharacter.transform.position += MyCharacter.transform.forward * speed;

then everything is working just fine.