ask a question about 'Transform.TransformDirection'

I have read the official document about the function TransformDirenction,it says that it can transform direction from local space to world space.

Here is my code:
MoveVector = transform.TransformDirection(MoveVector);

with this code, I want myPlayer to turn to the front of my camera, and move forward. But when I applied this code ,it seems that myPlayer had token it as his local space direction.he didn’t turn,and he just went forword as local space…

then I cancelled this code, now myPlayer went forward as world space,but still he didn’t turn…

This problem has been confusing me the whole afternoon … so…any help,please?

thanks a lot~and I think I’m gonna really need to improve my English…

wouldn’t be the camera transform vector you should pass in the transform direction, rather than your own same vector move, which i guess is your current character direction.

Is your player a child of the Camera? Or is it a child of something? If it’s in the root hierarchy, I guess world and local space are the same.

thanks!
I’ve solved it…

It seems that I just have forgot to align my player to the camera…