Making character roll while flying.

HELP! I desperately need your help! I’ve been trying to make the character roll/ barrel roll while flying, but I always end up rolling the camera instead of the character!

I’m using the thirdperson template blueprint. So I guess no. In the end the character isn’t rolling.

Still no fix :frowning:

you need to give your character the desired input, if you are rolling the camera its because you are telling the camera to roll.

Make sure your function is telling the character to roll, and not “self” or some such, (unless you are making the control functionality inside your character bp).

Realy I cant say much without seeing your setup, but hope that helped somewhat.

// gl

I’m making the function in third person blue print. Is there any more information that I can provide to help me? Oh, I made a new input called Axis-Roll by pressing either Q or E the value changes by 1.0 or -1.0 but I still can’t get the character to roll.

The control setup you got should work, but if that is in the player controller I would set the player character as the target for the movement input so you don’t need have the character follow the controller.

If your camera is in your character anim bp you also need to make sure the spring arm isn’t following the actors rotation, set this under spring arm → camera settings.

// glhf

am i missing something here?
cant see anything after the branch…

Can someone end my suffering by helping me out?

For roll axis I have set Q and E with (1.0 and -1.0) as the value in the input for the project setting.

I understood that you can’t use add movement node. But I’m confused on what axis value needs to go through to connect to the set rotation node.

2 things, Id recommend using the “get player character node” instead of the char movement → get parent you got now - mainly for clarity.

Secondly add another branch after the “is flying” check → drag out a node from the “axis roll” value using a “>” (greater than) node and set it to 0 (basically this makes “if axis value is above 0 then I am true”) → make 2 set actor rotation nodes → set their rotations to what works for left and right rotation, (just try out numbers when we are done) → connect these set rotation nodes to the true and false outputs from the branch.

^ This will check each time axis roll is changed witch direction your character should rotate, but again you would need to make a more advanced function for this to get a good feel out of it, (and to rotate the player back in place), if you still have trouble getting a hang of the input functions perhaps use a couple of “print string” nodes to visualize when right/left roll input is actually executed.

//glhf

Is the camera attached to the actor via a Spring Arm Component? If so you can lock the Pitch Yaw or Roll as required.

You need to use that axis value to drive the rotation of the character, just adding an input wont actually do anything instead you need to change the code/blueprint to use that input.

// If you want more help post a screenshot of your blueprint, I cant say what you need to look into without that, also it might be a good idea to look at some tutorials to get a more hands on knowledge of what you need to do to handle character input.

Sorry for late reply, I was busy for two weeks. Here are the blueprints for the barrel roll system.

I’m so lost right now, I don’t know which functions to use to properly roll without the camera.

I’m confused on where to get the world directions from and what node to drag it to the add movement of axis roll. This is all in thirdperson character bp.

You need to add a rotation to the character actor, movement input cant rotate something since it simply ads movement in a direction, to better understand this make a branch on axis roll after “is flying” based on the value of axis roll, (>0 roll right, else to left etc or whatever you have as your input), and simply tie that to a set rotation node, note that if your bp is in the player controller you need to feed in get player character as the target for that to work.

// This solution wont get you a smooth barrel roll, but it should help you visualize what you need to do, in order to get a better result you would need to have a function that smooth’s this out, you could try to make a float “interp”, (there are nodes for this), then use that float value to control the characters spin, and then helps the player get their bearing back to start again probably.

Hope that helped somewhat.