Rotation controls

Hi,
I’ve been beating my head against this for a while now so I figured I would ask the community. I’m trying to set a character(in this case a simple canon) in 2d which can only rotate its arm (or barrel since its a canon) so it can shoot in the direction its facing like in a peggle game. But i’m having a hard trying to setup the blueprint for this to work. I created an input name RotateRight and set “D” as 1.0 and “A” as -1.0.Here is what i’m using in blueprint but its not working. I’m I missing something? Any input would be greatly appreciated. Thanks!

Hi

So these controls are in your Player Character?

Can you put a Print String after the Input Axis to see if it is Firing.

Hi,
Thanks for taking the to reply. Actually the screenshot above is not what I’m using anymore since it makes the who character rotate which was not the desired effect. I’m still having a hard trying to just have a basic blueprint for a turret to be the player character in a side scroller. I just can’t seem to find what I need. I want to be able to either have the mouse to aim and shoot from the stationary turret or use the left analog stick on controller. I have the blend animations but for the life of me cannot find a solid input blueprint on how to rotate the turrets cannon, once I have that I can work on actually making it shoot. Any advice or input would be greatly appreciated!!!

With the photo above you will only rotate the cannon by 1°, bbeause the axis value goes from 0 - not pressed to 1 - pressed( this is only with buttons, with controller it a bit at a ). What you would need to do is change the set actor rotation to add actor rotation.

I made this tutorial for a different reason but it does basically what you want. You will need to modify a bit of the code or re-create some of the template 2D side scroller if you are working in a clean BP but that shouldn’t be too hard. Just replace the billboard I use here with your “barrel” sprite/mesh and it should get you close to what you want.

Hope this helps.