How to get local axis from characterController.velocity

I have an fps character that is not a rigid body. With the normal characterController.velocity you get the global velocity, i’m trying to get the local velocity (the x, y and z of the character game object) so that I can get a “forward”, “side” and “up” velocity. Is this possible and how?

the character.velocity i mean is: Unity - Scripting API: CharacterController.velocity

Thanks a lot!

Not sure what you are asking for. CharacterControler.velocity is not a global/world velocity. As the comments in the reference states, if the character is a child, this only captures the movement of the CC not the World velocity. But what I think you are asking about can be handled by Transform.InverseTransformDirection().