Hi all,
So, what I want to do is rotate my character 90 degrees (not smoothly, I just want him to turn sharply).
I have the below code:
CharacterRotation.Yaw += 90.0f;
TypingRunCharacter->SetActorRotation(CharacterRotation * DeltaSeconds);
It does not appear to do anything but if I take out “* DeltaSeconds”, the character rotates correctly but it breaks loads of other things (other actors in the scene have moved from where they should be etc.).
I have very similar code that rotates some platforms that the character walks on and that seems to work with no issues so I don’t understand why the above code doesn’t work.
Any ideas?
Someone on the forums suggested using the below but that only turns the character slightly (which is not what I want). It also still makes the platforms go out of place when run (the problem gets worse on lower spec PCs).
TypingRunCharacter->SetActorRotation(TypingRunCharacter->GetActorRotation() + FRotator(0.0f, 90.0f, 0.0f) * DeltaSeconds));
Thanks in advance.