so i found the soultion thanks to ClockworkOcean. so the problem was that in character movement component i had tick on both “orient rotation to movement” and “use controller desired rotation”.
i just had to untick the “orient rotation to movement”. also i kept the “use controller rotation yaw” ticked in class defaults
so for everyone in future who will see this post:
in class defaults:
“use controller rotation yaw” [
]
in character movement component:
“use controller desired rotation” [
]
“orient rotation to movement” [
]