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…