I have a pawn I am using as a player, and I am trying to rotate the root object (a capsule collider) 90 degrees when the spacebar is pressed. However, when I do it using a blueprint, it seems to partially rotate the player then return them to the original rotation. I’ve included a demo of what’s happening below - the player should be rotated right 90 degrees, so the bottom of the screen would align with the left wall.
It doesn’t seem to be a problem with the blueprint, as I tried disconnecting every event but rotation trigger and it still didn’t work. Nothing should be acting upon the object’s rotation anyway, although I have use ‘get actor rotation’ and altered the rotation of components. I’ve tried multiple different rotation nodes, but all ended up with similar results, including when I tried to create a loop that checks if the rotation has been completed. I am also able to rotate the player manually in the editor with no issues. What could be causing this issue? Thanks in advance.
Here’s an image of the code. The only times the pawn or capsule are acted upon aside from the intended rotation is with ‘AddForce’ (in the gravity section) and ‘SetPhysicsLinearVelocity’ (in the movement section). As I said I tried disconnecting all other events and still the rotation didn’t stick, but it’s always possible there’s some blueprint behaviour I’m unfamiliar with.
Sorry if I was unclear, I’m trying to rotate the entire pawn and not just the camera. I did test that just in case, but it didn’t work (it actually stopped my camera system working entirely, but I created a custom system as I’m not too familiar with the Unreal workflow). Thanks for the suggestion.