Retro FPS in Unity #1 - First Person movement

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

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

  • @purpleguy9002
    @purpleguy9002 5 лет назад +150

    I've been looking around for a tutorial series on how to make a retro fps like Doom or Wolfenstein for ages. Thanks for this, man!

    • @EliWargo
      @EliWargo 4 года назад +1

      Yea same this is really helpful

    • @snookems17
      @snookems17 4 года назад +2

      Jimmy Vegas has a Wolfenstein game tutorial. You should check him out.

    • @Cyber-Life
      @Cyber-Life 4 года назад +1

      @@snookems17 this looks more retro

    • @cynicalowl2938
      @cynicalowl2938 4 года назад +1

      canu give script, ive been failing

    • @purpleguy9002
      @purpleguy9002 4 года назад +1

      @@snookems17 I love Jimmy Vegas's tutorials. I watched his survival horror game series, and he's the reason I program.

  • @SomeOrangeCat
    @SomeOrangeCat 4 года назад +10

    As an artist who deals primarily in rendered assets, This looks like something that's right up my alley.

  • @AnthonyBaumgartner72
    @AnthonyBaumgartner72 4 года назад +49

    To prevent yourself from turning 360 vertically. You need to put a limit on how high and low the camera can rotate.
    Using the Mathf.Clamp, I made it so the Y rotation cannot be more or less the chosen min and max angles in Degrees.
    Glad I learned how to do this :D
    float maxAngle = 160;
    float minAngle = 10;
    Vector3 RotAmount = viewCam.transform.localRotation.eulerAngles + new Vector3 (0f, mouseInput.y, 0f);
    viewCam.transform.localRotation = Quaternion.Euler(RotAmount.x, Mathf.Clamp(RotAmount.y, minAngle , maxAngle) , RotAmount.z);

  • @cf6979
    @cf6979 4 года назад +8

    If you're on a Mac and having a problem with the assets unzipping into many 32 character random subfolders:
    Go to the Archive Utility on your Mac
    Go to Preferences
    Uncheck "Keep expanding if possible"
    The next time you try to unzip the file, you should see the unitypackage file as shown at 0:53

  • @denizdemir9255
    @denizdemir9255 4 года назад +6

    I'm a software engineering student trying to be an actual game dev. My passion lies with the 90s gaming scene, and I've been trying FOREVER to find a tutorial for Pseudo 3D games. Since there isn't an official name for this kind of games, i've just been trying to come up with new keywords that might help me find a tutorial. I am SO glad that I've come across to this. I'm only barely through the first video, but I'm really excited and I know that this is going to be great. Thank you so much, James. I'm planning to make a game that I'm really happy with before the quarantine is over.

    • @denizdemir9255
      @denizdemir9255 4 года назад +1

      Just got done with the video. It was great! Looking forward to watching the second one!

  • @sbfshadoe9918
    @sbfshadoe9918 3 года назад +4

    loved how you explained the lines of code!

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

    I literally watched thousands of tutorials and I couldn't find one with a working playercontroller... Then I found this one and finally it works!!

  • @redcherry569
    @redcherry569 4 года назад +7

    Hey James, thank you for this. Really well explained basics of 2D movement with mouse aim. Looking forward to the rest of the tutorials.

  • @andreranulfo-dev8607
    @andreranulfo-dev8607 5 лет назад +14

    That makes me reminds me some good times in the 90's.

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

      YES WHEN WE WERE SMLL IN 1990'S WE USED TO PLAY THESE KINDA GAMES IN THE WIN 98 PC

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

      ok boomers

    • @oliverb.8995
      @oliverb.8995 3 года назад +1

      @@eisendrag ok zoomer

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

      @@oliverb.8995 i will agree to that unless you look in my basement

  • @MasonWolf90
    @MasonWolf90 Месяц назад

    amazing video, this is one of the few tutorials that actually makes sense, thanks!

  • @NostalgikGamez
    @NostalgikGamez 4 года назад +3

    Maaaaan I want to make a doom like game so bad!!! Thank you for this!!!

  • @CRUMVIII
    @CRUMVIII 4 года назад +1

    This is VERY interesting since other tutorials I looked at used all the 3D project stuff so very eager to try this method out. Subbed.

  • @The_Sloth_Man
    @The_Sloth_Man 5 лет назад +1

    Just subscribed. Hear about you on reddit and this is exactly what I needed. Keep being awesome!

  • @nikolaivillitz6026
    @nikolaivillitz6026 2 года назад +4

    Quick question: what is the advantage of building everything sideways (on a "wall") as opposed to the "normal" way?

    • @robrobusa
      @robrobusa 2 года назад

      Have you figured it out, yet? I still have no idea...

    • @nikolaivillitz6026
      @nikolaivillitz6026 2 года назад +4

      @@robrobusa Since then I've built a couple of FPS controllers and I am pretty confident there is no reason to do it like this video. My best guess is he is used to making 2D games and just didn't consider that he could put things with the global Y axis as 'down', or he thought the global Z axis would make more sense as the 'down' direction?. It would probably work this way, but will make things harder since most other tutorials, code, addons and imported objects assume the Y axis is down. I haven't seen a single mention anywhere of anyone else doing things like this, so it is really confusing to see it here. I would honestly skip this video entirely and look for one that teaches standard/best practices. No use learning bad habits.

    • @robrobusa
      @robrobusa 2 года назад +1

      @@nikolaivillitz6026 Thank you! I think I found a different tutorial series which will help me make a simple doom clone ;)
      Thanks a bunch and happy gamedevving!

    • @robrobusa
      @robrobusa 2 года назад +1

      @@nikolaivillitz6026 Also, ... does it get easier?

    • @nikolaivillitz6026
      @nikolaivillitz6026 2 года назад +5

      @@robrobusa It certainly does! At first It was pretty frustrating that I couldn't write things on my own and it took forever to get working scripts. I think my problem was that I was avoiding the stuff I didn't understand, so I bought and watched a 5 hour tutorial series that explained C# in detail and took notes. Then while it was fresh in my mind I went back to tackle some previous tutorials that I was having trouble with and things made a lot more sense.

  • @EliWargo
    @EliWargo 4 года назад +1

    Dude i have been searching forever for a tutorial like this thank you so much!

  • @TheWehzy
    @TheWehzy 4 года назад +1

    Thanks a lot man, i've been looking for a guide like this for months!

  • @ByyakoKitsune69
    @ByyakoKitsune69 3 года назад +2

    loving this! Will you by any chance show us how to add things like a start screen, splash screens, options menu and a basic save system?

  • @r.i.pwindowsxp6876
    @r.i.pwindowsxp6876 5 лет назад +4

    ArgumentException: Input Axis Horizotal is not setup.
    To change the input settings use: Edit -> Settings -> Input
    how do I fix???

    • @tuncalansu9423
      @tuncalansu9423 5 лет назад +4

      make sure you write *Horizontal* instead of Horizotal
      -Hope it helps

    • @brotnjanin
      @brotnjanin 4 года назад

      @RIP Windows XP check if you have any errors in the code. Either that or upgrade to Unity 2019. I had that same problem in the 2017 edition.

    • @yagmire
      @yagmire 4 года назад

      @@brotnjanin i mean he's got a point

  • @xozzy7809
    @xozzy7809 5 лет назад +1

    Easy to understand and up to the point. Very nice tutorial :)

  • @jesseprice8030
    @jesseprice8030 5 лет назад +2

    Please PLEASE finish this series PLEASE

  • @Always_Chillin
    @Always_Chillin 5 лет назад +5

    Love your vids man. These really help me. Keep up the good work! 😁

    • @ParadoxAll
      @ParadoxAll 5 лет назад +1

      i think we all love his video

  • @robrobusa
    @robrobusa 2 года назад +2

    You might've answered this question at a different point but: Why do we not set up the world so that up and down are all correctly aligned? And why do we start a 2D scene?

    • @NathanAke000
      @NathanAke000 Год назад +1

      Because Doom and Wolfenstein are not 3D games, and are actually fake 3D. They are 2.5D

    • @robrobusa
      @robrobusa Год назад +1

      @@NathanAke000 I know. But there is no good reason for us to do so nowadays. Shifting the axes does nothing for us, really.
      This is a real 3D engine, not a raycasting engine.

    • @cadencedrysdale3130
      @cadencedrysdale3130 2 месяца назад

      ​@@robrobusa
      This is exactly why I'm switching to a different tutorial

  • @OmeedNOuhadi
    @OmeedNOuhadi 2 года назад +1

    Thanks a lot, I wish you could work on this project quite a few ways including a whole level build. Thank you!

  • @Top_Dawg360
    @Top_Dawg360 4 года назад +2

    Monobehaviour is white instead of green and
    Rigidbody2D is not showing up even after downloading Unity Tools and looking up everything I can, I cannot find the solution.
    How were you able to make it show up?
    I have been looking for 4 hours now and still cannot find the answer?
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class PlayerController : MonoBehaviour
    {
    public Rigidbody2D theRB;
    // Start is called before the first frame update
    void Start()
    {

    }
    // Update is called once per frame
    void Update()
    {

    }
    }
    Can you please help?
    Edit: Is it possible for an updated video to be made using Bolt instead or on how to use with Visual Studio 2019 and Unity 2020.1.9f1?

    • @skeletikgames
      @skeletikgames 4 года назад +1

      I'm having the same issue, it's one drawback of frequently updated engines, they start to make tutorials from even a year ago no longer work the same way in never versions. Hopefully someone figures it out, I've searched all the forums for an answer to this Q, seems like very few people are having the issue.

    • @Top_Dawg360
      @Top_Dawg360 4 года назад +2

      @@skeletikgames I already found the solution,
      You have to go to edit at the top
      Preferences
      External tools
      External Script Editor: set it to Visual Studio Community 2019 [16.7.6]
      After that, under generate .csproj files for:
      Select all the check boxes and click regenerate project files,
      And your problem should be solved.
      Im at part 8 of the tutorial now.

    • @skeletikgames
      @skeletikgames 4 года назад +1

      @@Top_Dawg360 Awesome, ok found it. Thank you!

  • @freedoomer2524
    @freedoomer2524 4 года назад +22

    if we are making an FPS in the style of wolf3D (aka no high floors or anything) why add vertical looking?

    • @freedoomer2524
      @freedoomer2524 4 года назад +2

      @@qneironaut yeah Wolf3D and doom are 2.5D and everyone knows that, im just asking why would we add vertical looking?

    • @freedoomer2524
      @freedoomer2524 4 года назад +1

      @@loco5169 doom and wolf3D? No they are 2.5D as computers werent well equipped to run full 3d games

    • @freedoomer2524
      @freedoomer2524 4 года назад +2

      @@loco5169 its all 2D. Like Wolfenstein its drawn to look 3D but everything in Doom is 2D

    • @freedoomer2524
      @freedoomer2524 2 года назад

      @Norwegian Cat doom is not 3D, its still a 2D game that uses more advanced rendering. and 2.5D is a real thing, its the term for a 2D thing (typically a game) but drawn and rendered in a way to look 3D

    • @freedoomer2524
      @freedoomer2524 2 года назад

      @Norwegian Cat the computer draws on to the screen and every frame the computer wipes the screen and draws again. Repeat until program enda

  • @gusdeveloper
    @gusdeveloper 5 лет назад +7

    fps 2D?! 🤯
    This video opened my eyes to how make a game like top gear. thank you! waiting the next video.

  • @uju5tg0tf1red
    @uju5tg0tf1red Год назад +1

    ok I may feel like a dumbass after this, but when I'm in visual studio the functions like Vector2, Quarternion etc, aren't highlighting green nor working properly, my project straight up won't start after I added the viewcam and replicated your code to a T.

    • @screechingscrimble
      @screechingscrimble 4 месяца назад

      I'm having the same problem too, any luck? I know its been a year since you commented but I was hoping you'd have an answer

  • @Zyrodil
    @Zyrodil 4 года назад

    Incredibly fun tutorial.

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

    I tried makeing the PlayerController script and when i tryed to put it in to the player it said the script class could not be found. help.

  • @notamanstudios4408
    @notamanstudios4408 4 года назад +2

    it says theRB is an unexpected symbol what do i do

    • @not_importan
      @not_importan 4 года назад

      I had a similar problem, was due to the fact that i misspelled the word RigidBody2D

  • @tydlrecords7096
    @tydlrecords7096 4 года назад +3

    i cant compile the player controller script

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

    My character is falling through the terrain. Why do I do?

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

    Awesome tutorial! Thank you!

  • @frankndork1082
    @frankndork1082 4 года назад +1

    The transform function in the script isn't turning green for me, and it won't work. What do I do??

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

      The same happened to me but with Vector2. Idk what to do?

  • @killdeer
    @killdeer 5 лет назад +24

    This might help me a lot. I'm starting a project on a first person immersive RPG like ultima underworld.

    • @jellohunter7981
      @jellohunter7981 5 лет назад +5

      KillDeer using unity 3D would make it more irrmersive

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

    Normal people: Is that a JoJo reference??
    People who watched this video: Is that a rigidbody reference??

  • @DarkNeArK007
    @DarkNeArK007 5 лет назад +1

    error :(
    transform.position = Quaternion.Euler(transform.position.EulerAngles.x,
    transform.position.EulerAngles.y,
    transform.position.EulerAngles.z - mouseInput.x);
    error CS1061: 'Vector3' does not contain a definition for 'EulerAngles' and no accessible extension method 'EulerAngles' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?)

    • @DarkNeArK007
      @DarkNeArK007 5 лет назад

      im stupid, it was rotation not position x.x

  • @nevercanyoucant
    @nevercanyoucant 4 года назад

    I just wanna know how to do that subtle dipping of the camera that simulates the head bob as you move forward

  • @world_eater1315
    @world_eater1315 11 месяцев назад

    for some reason i cannot get past the movement section. i checked all code and everything and yet theres no input from the arrow keys while testing

    • @oatmiser3110
      @oatmiser3110 9 месяцев назад

      I assigned moveSpeed = 5f inside Start() and then it works

  • @polskikurak4409
    @polskikurak4409 4 года назад +1

    Ok but how to make him not to do 360 rotation on y axis?

  • @merterdogan8182
    @merterdogan8182 4 года назад

    How can i limit the camera looking up and down because camera flips upside

    • @drozthewolf
      @drozthewolf 4 года назад +5

      Write this, someone else posted here and it worked for me!
      //Limits Camera Rotation
      float maxAngle = 160;
      float minAngle = 10;
      Vector3 RotAmount = viewCam.transform.localRotation.eulerAngles + new Vector3 (0f, mouseInput.y, 0f);
      viewCam.transform.localRotation = Quaternion.Euler(RotAmount.x, Mathf.Clamp(RotAmount.y, minAngle , maxAngle) , RotAmount.z);

    • @merterdogan8182
      @merterdogan8182 4 года назад

      @@drozthewolf Thank dude!

  • @JRHainsworth
    @JRHainsworth 4 года назад

    How would I make the movement left right, in and out instead of up and down?

  • @unamusedrowlett6303
    @unamusedrowlett6303 5 лет назад +2

    so how is this channel's upload schedule? will i be waiting a month for each part or is it once a week?

  • @VojaGames
    @VojaGames 3 года назад +3

    Why can't I move my mouse side to side? I did everything right and when I start playing I get 999+ Errors saying "ArgumentException: Input Axis MouseX is not setup" but it is set up. Unity 2020.3.4f1 version, please help!

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

      Make sure in your script it's ("Mouse X"), I had this issue too

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

    i have a weird thing that the palyer slowly moves to the one side when not pressing anything, whats causing this?

  • @thegermancoder-gamesapps8179
    @thegermancoder-gamesapps8179 5 лет назад +1

    In " theRB.velocity = moveInput * moveSpeed; " why not adding a " * Time.deltaTime "?

    • @thegermancoder-gamesapps8179
      @thegermancoder-gamesapps8179 5 лет назад +1

      nevermind, found out it makes it REALLY slow, so if you put in " * Time.deltaTime" you have to make it propably about 500

    • @not_importan
      @not_importan 4 года назад

      @@thegermancoder-gamesapps8179 Hey, what is slow? the speed ?
      And why did you think to use Time.deltaTime instead?
      I know it has been 10 months, but i am just curios

  • @comikawn5147
    @comikawn5147 4 года назад

    best developer & teacher eveeer !!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @jalaman5361
    @jalaman5361 4 года назад

    thank you for making this video

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

    There is a way to move player forward and back without needing turning the camera? thank you!

  • @JohnVelma
    @JohnVelma Год назад

    how to make Jump for character ?

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

    is it hard to change camera and controlling to make it VR version e.g for oculus quest?

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

    how do you get the rotational sprites to work in multiplayer

  • @alfredopark2215
    @alfredopark2215 4 года назад

    how would we implement a jump function?

    • @Guipandapandi
      @Guipandapandi 4 года назад +1

      Use a rigidbody3D instead and use theRB.Addforce(value,forcemode.impulse)

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

    how can i make the player jump

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

    Question, does this billboard sprite things work with multiple players?

  • @robertwatson3768
    @robertwatson3768 4 года назад

    I can't put 'TheRB' into the script in the Inspector, how do I fix this?

    • @Guipandapandi
      @Guipandapandi 4 года назад +1

      If anyone has the same issue. Use TheRB = GetComponent(); in Start function

    • @Top_Dawg360
      @Top_Dawg360 4 года назад

      @@Guipandapandi
      Monobehaviour is white instead of green and
      Rigidbody2D is not showing up even after downloading Unity Tools and looking up everything I can, I cannot find the solution.
      How were you able to make it show up?
      I have been looking for 4 hours now and still cannot find the answer?
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class PlayerController : MonoBehaviour
      {
      public Rigidbody2D theRB;
      // Start is called before the first frame update
      void Start()
      {

      }
      // Update is called once per frame
      void Update()
      {

      }
      }
      Can you please help?
      I have never coded before and after looking for the solution, I can't find it online, how do you structure the code,
      TheRB = GetComponent();
      in the start function?
      Would it just look like:
      void Start()
      {

      TheRB = GetComponent();
      }
      ?

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

    Hey I’m on a Mac how do I get the small x

  • @thelvadam5834
    @thelvadam5834 4 года назад

    Can someone help it keeps saying Input Axis mouse x is not setup as an error

  • @AndrewMaksym
    @AndrewMaksym 4 года назад

    Would it be possible to do this, but use Bolt coding instead of Visual?

  • @uncleyoyo1
    @uncleyoyo1 5 лет назад +1

    Nice job, friendo

  • @gatarsystem
    @gatarsystem 4 года назад

    Would it working on 3d project?

  • @LetsBuildWithExoticWolfieTM
    @LetsBuildWithExoticWolfieTM 5 лет назад +1

    this is sulpha cool it looks 3d but its 2d im kinda confusion is it actually 2d or is it renderd as 3d idk im mind blown

  • @Paul-qu8ui
    @Paul-qu8ui 5 лет назад

    in unity it says that no overload method for euler what should i do
    this is my script
    transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, transform.rotation.eulerAngles.z, - mouseInput.x);
    anybody knows what is wrong

    • @joe_morris
      @joe_morris Год назад

      3 years late here, but remove the comma after z. It's causing it to take -mouseinput.x as a fourth value, instead of subtracting mouseInput.x from transform.rotation.eulerAngles.z

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

    Is this a 2d or a 3d unity project?

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

      Think you want a 2D project my guy

  • @gheran5858
    @gheran5858 5 лет назад

    The code isn't working for me. I am currently using the latest version, do I have to use the version you are using?

  • @limelite2786
    @limelite2786 4 года назад

    Anyone know how to change the input keys to wasd and not the arrow keys? Edit: wait nvm

  • @lukagolob2421
    @lukagolob2421 4 года назад

    When I type:
    moveInput = new Vector2(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal"));
    Vector3 moveHorizontal = transform.up * moveInput.y;
    Vector3 moveVertical = transform.right * moveInput.x;
    theRB.velocity = (moveHorizontal + moveVertical) * moveSpeed;
    It only works on horizontal axis.
    Does anyone have a solution?

    • @binodsarkarIN
      @binodsarkarIN 2 года назад

      //Player Movement
      MoveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
      Vector3 MoveHorizontal = transform.up * -MoveInput.x;
      Vector3 MoveVertical = transform.right * MoveInput.y;
      TheRigidBody.velocity = (MoveHorizontal + MoveVertical) * MoveSpeed;

  • @Soloman274
    @Soloman274 5 лет назад +1

    I am confused - are you Jimmy Vegas?

    • @gamesplusjames
      @gamesplusjames  5 лет назад

      nope :D

    • @MobileTechGeek
      @MobileTechGeek 4 года назад

      @@gamesplusjames I followed exactly what your code said but the transform.up did not make the character move forward when rotated,
      our code was identical so why did that happen?

  • @longjohn7992
    @longjohn7992 4 года назад +2

    *why didn’t you just use 3D*

  • @nikunjsethi9351
    @nikunjsethi9351 4 года назад

    cant move the mouse view in up direction

  • @rishabh999100
    @rishabh999100 5 лет назад

    any update on Portalnauts?

    • @gamesplusjames
      @gamesplusjames  5 лет назад +1

      Not at the moment, but I will have some game-related news coming soon :)

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

    Which template is he using?

  • @vampireflowerr
    @vampireflowerr 4 года назад +1

    this reminds me of a game where demons killed a guys pet bunny and the guy kills a bunch of demons

  • @someanimeguy8026
    @someanimeguy8026 4 года назад +1

    That's doom but look diffrent but looks nice I like games like doom enteral

  • @KirbyJustDied_YT
    @KirbyJustDied_YT Год назад

    can u give script errors keep comng up for me

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

    imz be getting error CS1061 :/

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

    i'm having issues with the script! 'empty literal'

  • @KarosuMaker
    @KarosuMaker 5 лет назад +2

    I'm rewatching the first part, and I'm not sure if I did something wrong, but I can't lock the character from looking too low or too high, so he can flip 360.
    I've been experimenting with Mathf.Clamp, but I think I'm still to onoob to get any result yet.
    The tutorial will ever touch on this issue or it's not an issue and I did something wrong? xD

    • @Defucota
      @Defucota 4 года назад +1

      I have the same issue did you get your answer mate?

    • @not_importan
      @not_importan 4 года назад

      @@Defucota Check the comments now.
      The original tutorial does not lock the camera from turning 360, but a guy @Anthony Baumgartner
      wrote a comment on how to do it

  • @Regular_Watermelon
    @Regular_Watermelon Год назад

    Error...
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class PlayerController : MonoBehaviour
    {
    public Rigidbody2D theRB;

    public float moveSpeed = 5f;

    private Vector2 moveInput;
    private Vector2 mouseInput;

    public float mouseSensitivity = 1f;

    // Start is called before the first frame update
    void Start()
    {

    }
    // Update is called once per frame
    void Update()
    {
    moveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));

    Vector3 moveHorizontal = transform.up * -moveInput.x;
    Vector3 moveVertical = transform.right * moveInput.y;

    theRB.velocity = (moveHorizontal + moveVertical) * moveSpeed;

    mouseInput = new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y")) * mouseSensitivity;
    transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, transform.rotation.eulerAngles.z - mouseInput.x);
    }
    }

    • @Tono-be5er
      @Tono-be5er Год назад +1

      This is fixed : using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class PlayerController : MonoBehaviour
      {
      public Rigidbody2D theRB;

      public float moveSpeed = 5f;

      private Vector2 moveInput;
      private Vector2 mouseInput;

      public float mouseSensitivity = 1f;
      public Transform viewCam;

      // Start is called before the first frame update
      void Start()
      {

      }
      // Update is called once per frame
      void Update()
      {
      moveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));

      Vector3 moveHorizontal = transform.up * -moveInput.x;
      Vector3 moveVertical = transform.right * moveInput.y;

      theRB.velocity = (moveHorizontal + moveVertical) * moveSpeed;

      mouseInput = new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y")) * mouseSensitivity;
      transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, transform.rotation.eulerAngles.z - mouseInput.x);
      }
      }

    • @Regular_Watermelon
      @Regular_Watermelon Год назад +1

      @@Tono-be5er thanks

  • @AndrewSouzaGames555
    @AndrewSouzaGames555 7 месяцев назад

    Awesome

  • @joeass2399
    @joeass2399 4 года назад

    Can someone help me i can infinitely look down

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

    Thanks now i can make my on Boomer Shooter

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

    13:46

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

    wheres the code?????

  • @dopplerdrecki
    @dopplerdrecki Месяц назад

    9:07

  • @snookems17
    @snookems17 5 лет назад

    I keep getting an error when I put it this way.
    // player movement
    moveInput = new Vector2(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal"));
    Vector3 moveHorizontal = transform.up * -moveInput.x;
    Vector3 moveVertical = transform.right * moveInput.y;
    ThRb.velocity = (moveHorizontal + moveVertical) * moveSpeed;
    // player view control
    mouseInput = new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y")) * mouseSensitivity;
    transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y,
    transform.rotation.eulerAngles.z = mouseInput);
    transform.rotation.eulerAngels.z = mouseInput gives me error.

    • @cutesexybabe69
      @cutesexybabe69 5 лет назад +2

      it's - mouseInput (minus), not = mouseInput

    • @snookems17
      @snookems17 5 лет назад +1

      @@cutesexybabe69 thanks, I already got it fixed

  • @MrAlexitoooooooooooo
    @MrAlexitoooooooooooo 5 лет назад

    Thanks

  • @LaylaSheep
    @LaylaSheep 4 года назад

    AWESOME!

  • @shaynebates7190
    @shaynebates7190 2 года назад

    Adding a comment for the algorithm

  • @1zeldalegend
    @1zeldalegend 5 лет назад +1

    Thanks James!!!!! Coñoo

  • @lincolnsnewaccount41
    @lincolnsnewaccount41 5 лет назад

    honestly i just wanted to see how to make 2d-3d games

  • @taimjoestar4111
    @taimjoestar4111 4 года назад

    nice

  • @rani6610
    @rani6610 4 года назад

    Why do I hear a Rock Guitar now

  • @Cyber-Life
    @Cyber-Life 4 года назад +1

    a vector tree

  • @lincolnsnewaccount41
    @lincolnsnewaccount41 4 года назад +1

    or we could just rotate the *fucking floor*

  • @emirkaplan7384
    @emirkaplan7384 5 лет назад +2

    please dont leave this project (etc. rpg project)

    • @gamesplusjames
      @gamesplusjames  5 лет назад +3

      Of course! The rest of the series is coming soon! :)

  • @camerontully957
    @camerontully957 5 лет назад

    How do create a fighting game

  • @ExistanceIsKey1
    @ExistanceIsKey1 Год назад

    imma remake Doom in Roblox 1993

  • @dlxinteractive
    @dlxinteractive 5 лет назад +4

    DOOM

  • @orkun441
    @orkun441 5 лет назад

    im confused because of this 2d fps

    • @unamusedrowlett6303
      @unamusedrowlett6303 5 лет назад +1

      think like how the first doom games were made. if it'd how your code is,let me know