Problem with replicating looking direction

Hi everyone,

I managed to script a system for having my character “looking direction” multicasted to clients and server, in this way i can use this variable in an aim blend space and make my character’s head rotating when i rotate the camera (when the character isn’t moving).
The system works pretty well,but my looking direction’s values depends on the world and are not relative to where my mesh is going, so if my character is oriented in the ri9ght direction, when i move the camera it works fine, but if i turn my character and i move the camera it doen’t work properly.
someone know how to setup this variable to be relative to the front of my mesh?