How do I make 2 Joysticks

  • Hello,

    I made a joystick for movement and i want an other one for angle.

    Ex:

    i must make it to go in a direction (Joystick1)

    and to shoot in an other direction (Joystick2)

    I have tried :

    Every tick > set player angle > Joystick2.angle

    It didn't work.

    Help?

    P.S. I made a example fast but i need help to introduce the second joystick

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I actually have a file for that! Its designed to work with a physical controller, but the code translates quite readily. Its a bit messy, but I highlighted the important parts in the image.

    Ignore the ugly background. It turns out the texture brought the file up over the 2 meg limit.

    Basically, the function you need is Angle. It takes 2 points, so if you're making a touch joystick take the origin of the joystick as point 1, and the location of the touch as point 2. angle(JoyOriginx,JoyOriginY,TouchX,TouchY) .

  • saumanahaii

    Nice Game ,

    Look I almost made it but i have a problem with the touch.

    i don't know why it goes left and the joystick from movement is going to the joystick to the angle.

    Could you repair my crash?

    Thanks a lot!

  • anty21ro

    Saw,that youre online, could you possible help me?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)