Barrel Roll Character Issue

After I barrel roll my character, left become up. It’s as if the mouse doesn’t know that we’ve rotated. The camera is also on a spring arm. Could that be the issue? And can this be fixed with Blueprints or C++?

My PlayerController

Can you send a blueprint screenshot of how you’ve implemented the barrel roll?

Sure, I’ve updated the question with a screenshot of my Player Controller. Just keep in mind the mesh i’m rotating parent class is Character and it’s using the “Character Movement” component.

Sorry…should have been more specific. Can you paste screenshot of blueprint control for the pitch and yaw input?

Yeah sure. It’s basically the same. I need to move it to the PlayerController BP later. (Hence the reference)

Thanks! This is how I assumed you were handling the input based on the results. Basically, AddControllerPitchInput and AddControllerYawInput always use the world up and right vectors to apply the delta rotation. It doesn’t take into account your current roll. It always behaves as if your character is standing straight up. Not great for flying characters.

My suggestion would be to add rotation to the character (ie. not the controller). There should be an AddLocalRotation function you can call on the character. Note that after applying that rotation to the character, you’ll probably want to take the resulting final rotation and slam the controller rotation to be the same. Other systems may be relying on it.

Like this?

Sorry…I meant specifically for yaw and pitch. Roll is probably fine to keep as you had it or leave as you now have it. But yeah…that’s the general idea.

Also, like I said, you’ll want to slam controller rotation to the pawn rotation after doing this. Other systems may rely on it.

Alrighty, how do I slam the controller rotation?

That part may not be necessary…but I’ve found it’s a bit safer to do so. Basically, after adding the rotation to the character, make a call to get it’s resulting world rotation, and then set your controller to have that same world rotation.

Weird, now nothing works. Rolling still does but pitch and yaw doesn’t.

Right…if you’re not going to slam the controller rotation to the same as the pawn, you’ll definitely need to uncheck the boxes that tell the pawn to use controller yaw & pitch.

Got it – it all works great. Thank you very much

Sweet! I converted one of my comments to an answer if you think that solved your problem :slight_smile: