Unity C# : 2 controllers - Move & Rotate

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 14

  • @hieptrantuan1105
    @hieptrantuan1105 3 года назад +1

    Could you make a tutorial about player automatically rotates to face the cursor but only rotate in Y axis? just like some top down shooting game
    Also your tutorial videos are very helpful, looking forward to seeing more

    • @aboutgamemaking
      @aboutgamemaking  3 года назад +1

      Ok, do u mean charater's Y rotation via only mouse movement? Not pushing mouse button?

    • @hieptrantuan1105
      @hieptrantuan1105 3 года назад

      @@aboutgamemaking yes, i mean that, and i use mouse and keyboard to input

    • @aboutgamemaking
      @aboutgamemaking  3 года назад +1

      @@hieptrantuan1105 Alright. It is simple that it doesn't need to make tutorial.
      All you have to do is, make new inputs with "MouseX" and "MouseY".
      codes are :
      float mouseX = input.GetAxis ("Mouse X");
      float mouseY = input.GetAxis ("Mouse Y");
      / each Mouse X and Y string values are reserved by Unity Input system.
      now you know how to make input with mouse movement, the next thing is modifying existing codes of the tutorial.
      Try it first, let me know if you are not getting it.

    • @hieptrantuan1105
      @hieptrantuan1105 3 года назад +1

      @@aboutgamemaking i made it, thank you very much, looking forward to seeing more tutorials, could you make tutorial about shooting system when pushing keystroke or mouse button? I really love that yui-chan model with guns

    • @aboutgamemaking
      @aboutgamemaking  3 года назад +1

      @@hieptrantuan1105 I am so happy you did it!
      maybe your request is also simple that it doesn't need the tutorial too.
      You may know there are options about Input. function.
      All you have to do is :
      input.GetKeyDown and input.GetKeyUp
      Therefore, you can start and stop firing bullets with two conditional code with that.
      :)

  • @SpaceFlightSimulator
    @SpaceFlightSimulator 3 года назад +1

    Can u make a video of quality settings specially for mobile devices.

    • @aboutgamemaking
      @aboutgamemaking  3 года назад

      Do you mean Quality Settings in Project Settings?

    • @SpaceFlightSimulator
      @SpaceFlightSimulator 3 года назад

      @@aboutgamemaking Yes

    • @aboutgamemaking
      @aboutgamemaking  3 года назад

      @@SpaceFlightSimulator Ok, then do you need detailed description of each option?

    • @SpaceFlightSimulator
      @SpaceFlightSimulator 3 года назад

      @@aboutgamemaking hmm thanks

    • @aboutgamemaking
      @aboutgamemaking  3 года назад

      @@SpaceFlightSimulator Ok, uhhh....
      When you entered Quality Settings in Project Settings, you will find a Button with Question Mark.
      That button is linked the Unity Document, and all descriptions about options in Quality Settings.
      Try it and if you don't understand about some of options, let me know. :)