Like the tittle says im not able to rotate my character with c++. I have a wall run mechanic in my game but when the character exits the wall run its rotation changes to the one it had before. I think this happens beacause i set Camera->bUsePawnControlRotation = false; and bUseControllerRotationYaw = false; before the wall run and after the wall run is done i set them back to true. But when those are set to true the only way i can rotate my character is with AddControllerYawInput but using this the rotation change takes to long and i want it to be done in an instant.
If you know why the rotation goes back or if you know how to rotate the character please help me. Thanks in advance.
Hi @Fire_Ale! How are you? Could you share a video of the issue? How are you rotating the player when it overlaps with the wall?
The function you should use to rotate the player’s Actor is SetActorRotation, where you pass an FRotator (which you could recreate using the normal of the wall’s surface).
Heres a video of the issue. I rotate the palyer using the onHit function and using setActorRotattion. I think i already tried setActorRotation for after the wall run but im gonna try again. The problem i think i have is that when bUseControllerRotationYaw = true; setActorRotation is not working.