- Home /
Twin-Stick Movement
Hi, I'm making twin-stick combat game. The character can move seperatly from where he is looking. But the problem is I cannot play properly animation. For animation I use 2 axis blend tree.. (0,1) is for forward (0,-1) for backwards (1,0) for right (-1,0) for left. I want to rotate left stick's vector relative to right stick's. But I couldn't find any way. Thanks in advance.
Answer by teknochaos · Feb 10, 2021 at 10:28 PM
So, What did I is simpy this:
Vector3 vec = transform.forward * movementVector.x + transform.right * movementVector.y;
movementVector is just vector I get from left joystick. And transform is charcater's. When I get the Vector3, I just simply assign my animator float values.
Update: So, I came across a video from Jason Weimann (video link). And he uses some method. The method is Vector3.Dot and it does exactly what I want to do. If you want to make twin-stick movement system like me. I recommend you to watch video.
Your answer
![](https://koobas.hobune.stream/wayback/20220613024941im_/https://answers.unity.com/themes/thub/images/avi.jpg)