Simple rotation using joystick [FREE] [9 LINES OF CODE] [UNITY 2020] [PHONE + PC]

preview_player
Показать описание
soo yeah, next tutorial for unity :)
you can use joystick on phone
Рекомендации по теме
Комментарии
Автор

Code ::

public Joystick joystick;
public float rotateHorizontal;
public float rotateVertical;

public void FixedUpdate(){
rotateVertical = joystick.Vertical * 1;
rotateHorizontal = joystick.Horizontal * -1;

transform.Rotate ( rotateVertical, 0, rotateHorizontal);
}

mynameisfreaky
Автор

Good Man....Tank U man..U saved my time

duh
Автор

It does not work for me. On the finished "rotating script" i do not get a option to drag the "Fixed Joystick" to the script....

eliasjepp
Автор

THANK. FUCKING. Ik it was so simple and I was just over thinking it but I’ve been through many YouTube tutorials and none were what I’m looking for this worked perfect for my camera.

audacityfilmsproductions
Автор

Просто бомбезно, чувак. А как сделать ограничения на движение ? ( translate )))

Димас-ТвойРазработчикИгр
Автор

can u make one for 2d platformer, please!!!

ranjithnagarajan
Автор

how can I bring it to make my 2d player move to the left and right

maxengl