Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question TinyPhysics Sample Project - Keyboard VS Joystick

Discussion in 'Project Tiny' started by newguy123, Nov 27, 2020.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    Hi Guys

    Loving the physcis sample and how things are done. Great way to learn.

    However, something that is bugging me that I'm tryiong to workaround is the kyeboard vs joystick controls. When using the joystick, the character turns nice and smoothly and gradually over a number of degrees. The movement is very natural. Same cannot be said for the kyboard controls. When using keyboard, the turns are an abrupt sudden 90 degree turn.

    Things get even worse if you link the cam to the charcater to convert it into a 1st person type thing. Joystick controls are great, but using keyboard, its impossible to walk where you want due to the 90 degree turns.

    How may I change the keyboard control code to function more like the smoothness of the joystick turns?

    Help is be greatly appreciated!
     
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    It gets worse

    If I move the camera and parent it to the charcater, then the joystick no longer works, I cant tap on the blue button and the dragging the knob direction (or attempting to do it,) doesnt do anything

    Its almost like there is an invisible layer between the cam and the joystick control and clicking anywhere cant get to the controls

    upload_2020-11-30_14-35-18.png

    upload_2020-11-30_14-35-59.png
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    upload_2020-11-30_16-54-21.png

    so if I add a 2nd camera and link it to the character, make is smaller, then it acts almost like a 1st person camera, although the controls is still wack.

    What I dont understand then is, why cant I just drag the main camera with the joystick and link that to the camera, instead of adding a 2nd camera to the character!
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    I'm attempting to implement the TinySpaceship controls instead. It seems much smoother and the movement is more what you'de expect from a 1st person type experience.

    Any potential issues doing this that I need to look out for?
     
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    I'm struggling to adapt the TinySpaceships controls and make it work in TinyPhysics. Can somebody give me a hand please?
     
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    I could never get this to work

    Would it be possibly to get a 1st person camera keyboard and joystick control sample project for Tiny 0.32 coming this month please?
     
  7. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    I Will take note of this suggestion, 0.32 is already in the process of being shipped
    What happens if add the player components, capsule collider to the camera?
    I'm sure you will get 1st person view
    regarding the controlls, we have support for UI in 0.32 so the virtual joystick will behave as real UI and not just 3d floating meshes