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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Games RTS Framework

Discussion in 'Projects In Progress' started by Johnny-Casual, Jul 22, 2023.

  1. Johnny-Casual

    Johnny-Casual

    Joined:
    Oct 7, 2014
    Posts:
    20
    Hi,

    here im going to share with you my progress in developing a RTS game, and here im going to share with you my camera script for you to use, share, give criticism, feedback, sugestions on where i can improve and so on. So this is the first module that i have finished.

    thanks
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,310
    Code (CSharp):
    1. Input.GetKey("w")
    Please use keycodes:

    Code (CSharp):
    1. Input.GetKey(KeyCode.W)
    Requesting the actual printed letter by using "w" will make this input handling largely incompatible with keyboards of locales other than your own.

    For example on a french keyboard the WASD controls would be rather awkward as you can see:


    Also, if I remember correctly, if you check for "w" but the user holds down Shift at the same time, this key will not register. Meaning you'd have to also check for "W".
     
    Last edited: Jul 22, 2023
  3. Johnny-Casual

    Johnny-Casual

    Joined:
    Oct 7, 2014
    Posts:
    20


    Hi thanks for the input, I did the changes, some improvements, and bug fixes. The updated code is up.