#Rotate Character 90 Degrees

1 messages · Page 1 of 1 (latest)

jovial trellis
#

Hey everyone! I am attempting to rotate my player character 90 degrees either to the left or to the right via a keypress. I can't sleuth out how to achieve this. Here is what I've currently tried, using Input Actions with the left and right keypresses as different actions. I can rotate a simple actor with the FRotator, but this doesn't appear to work on the player character itself.

static robin
#

as the name suggests, AddActorLocalRotation adds to the current rotation

#

you're calling it as if you're setting the absolute rotation

#

you just need to call it with FRotator(0, 90, 0). or -90 depending on direction

jovial trellis
static robin
#

Ah, I thought PitchValue, YawValue, and RollValue, were calculated beforehand

#

But okay fair enough, nevermind what I said then