Twin stick shooter rotation default

hello, whenever i stop turning or release the pad my character goes back to his initial position. Can somebody help me? For instance he is always facing X+ if i stop y- he will teleport back to X+

Thank you :slight_smile:

bump
I’m using the default twin sticks hooter tutorial

Bump :frowning: Is this so complicated or just really simple ?

Still no one? :smiley:

Then you made a mistake. Check your character’s BP again.

I haven’t edited it. That’s how it is by default. I would like the rotation to remain last used rotation

So, you’re not following the tutorial but using the twin-stick shooter template, right?

Does the same happens when you use only the keyboard?

Try a bigger value here (instead of 0.0 try something like 0.25):

I tried that, still the same thing.

He’s oriented right and any orientation i give him after i let go he turn back right. With keyboard or joystick

(see comment below before this one)

Just two more questions:
1- what are the values of GetMoveForward and GetMoveRight when you press nothing
2 - what happens if you remove the gamepad.

Try this first: at the input settings try to change the sensitivity of the used axis from 1 to 0.3 to see what happens:

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_133858_1522528705288_858”}[/ATTACH]

Does not work, Can you tell me how to see the values when i’m not pressing ?
Also, thank you for your time

On the axis mappings set the scale in both gamepad axis to 0 (this will probably make the gamepad stop working):

I’d like to hop in here for some advice on my own. I have the movements left, right, forward and backwards set up. I also have the looking up, down, left and right set up. But, when I apply a character I can’t no longer look up or down. Could this be similar to what’s causing the issue here or…?

I experienced that when my axis values were incorrect. I use “100” and “-100” as my axis values. Play with that and it’ll work.

This seems to be a common problem that doesn’t like to be fixed.

this tutorial Learning Unreal: Twin Stick Shooter – Player Rotation | Burning Carbon

Generates a system that will hold MOST facings. But strangely there are a few angles (like close to 12 o’clock ) where it will snap to the closest axis. Also I found that for some reason when I used this you couldn’t just look straight to 6 o’clock. You could pan through it but if you were looking say 3 and tried look straight “down” it wouldn’t.

I’ve tried to edit it several times. I assumes since it was a unit circle that the x^2 + y^2 must be one. So I tried setting up a variable that stores actor rotation if those inputs >=1
Then on event tick if there was no input from the right stick it would set the rotation to that variable. It still didn’t work.
When I get to a computer I’ll post my current BP. As I added in a feature that makes the character face direction your moving if your not facing and I’ve basically performed back alley surgery trying to remove this snap it’s messy. But maybe you can get some ideas and we can solve this once and for all

The problem the OP has, is most likely related either with the sensitivity of the stick or something he changed without noticing. However, even without the gamepad and just using keys, he still has the same problem (no input => player always ends facing +X), which is weird and have been unable to duplicate.

If someone wants to know what the problem looks like, just take the twin stick shooter template and bypass the first condition in the ship’s BP (this will make the ship to turn to +X every time you drop the commands):

I figure it’s that the joystick is putting in a vector of (0,0) and so the mesh returns to what would be a “default” direction for it.
My character used to always face -y on the axis when released. I had to make it only accept input when the sick was above certain thresholds. And trying to find a sweet spot.
I figure when I do that and release the stick it snaps a little bit faster to one of the axis which is why if i’m close to 12 o’clock, it will snap to the +y and if i’m close to 3 o’clock it snaps to +x.

Here is my code as promised.
Also did a recording of how the facing works, and had it snap a few times to show.