Unity FPS Movement Tutorial by Dani | Karlson Parkour FPS Controller

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

Комментарии • 4,9 тыс.

  • @DanisTutorials
    @DanisTutorials  4 года назад +3097

    sorry i dont know how to make tutorials but whatever here you go
    smash subscribe or i smash you

    • @Kozzado
      @Kozzado 4 года назад +51

      but i already smash subscribe what i do now? ._.

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

      Smashers

    • @Dragonoidalpha
      @Dragonoidalpha 4 года назад +23

      DanisTutorials
      Can you do a tutorial on starting in unity?

    • @tix2pix855
      @tix2pix855 4 года назад +9

      IMA MAKE MILK ON ROBLOX STUDIO

    • @clashultimate1339
      @clashultimate1339 4 года назад +14

      HEY DANI I CAN DESIGN A WEBSITE FOR YOU FOR FREE let me know if you are interested....btw got milk? 🥛

  • @critz5560
    @critz5560 4 года назад +828

    me waiting for wallrun tutorial:
    "Its been 84 years."

  • @Cyranek
    @Cyranek 4 года назад +2737

    I wish Dani was my CS professor

    • @DanisTutorials
      @DanisTutorials  4 года назад +1167

      At least I can be your daddy

    • @diegocadavid7779
      @diegocadavid7779 4 года назад +178

      @@DanisTutorials WTF BRO

    • @anshulsingh8326
      @anshulsingh8326 4 года назад +114

      @@DanisTutorials sugar dani 🤣😂

    • @_Kori
      @_Kori 4 года назад +42

      what the fuck

    • @jlewis4441
      @jlewis4441 4 года назад +18

      @Cats and cat things pfft, Dani Obviously... 🙄

  • @Itsguifi
    @Itsguifi Год назад +28

    I love how he just gives you the scripts but then goes on for more than five minutes explaining it, awesome plus for anyone lazy (like me). Really cool!

  • @saucywatermelon5024
    @saucywatermelon5024 4 года назад +212

    Unity actually suggested this video in their getting started with 3D playlist

  • @EeveeGamer-qc3vo
    @EeveeGamer-qc3vo 3 года назад +488

    As a wise man once said: "Hippity hoppity your code is my property" (the wise man is Dani).

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

      yes we took his code

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

      how dare you use my own spells against me potter

    • @0nebisnn
      @0nebisnn 3 года назад +2

      Ho shiz Sherlock

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

      ruclips.net/video/6Veg07TSN1I/видео.html

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

      Yo guys can u please help, i did all of dani's instructions correctly but when i try to look up, instead i look down, and vice versa. Also when i press w, a, s or d they make me walk the total opposite direction. Any help with this is totally appreciated

  • @Shabpassiongamer
    @Shabpassiongamer 4 года назад +3279

    Why don't you make a VR game (OR YOU CANT)

  • @JackSpartan276
    @JackSpartan276 3 года назад +23

    I adapted this for my 3rd person game with cinemachine and works amazing, thanks man! Good luck on your journey to become the ultimate memer game dev!

  • @eroliv1837
    @eroliv1837 4 года назад +465

    Brackeys:Shows us the code and tell us what it means so we can read it.
    Dani:so uhh, download the script from this link

    • @thomb.9013
      @thomb.9013 3 года назад +9

      yep.
      if you follow brackeys:
      oh yeah I understand this well now!
      when you follow dani:
      (generated with autocorrect suggestions )
      400gr ei is a great way to get and use those tools to help you find the best gpu UNDER 200 is a gt 1030 that is a good 5 and a great idea and a great idea of what to use

    • @boldsans1070
      @boldsans1070 3 года назад +14

      Brackeys one is annoying to follow, danis isn’t

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

      How do you download it?

    • @dinoo4790
      @dinoo4790 3 года назад +6

      @@Maximusmaxamin ctrl+c ctrl+v

    • @crazct
      @crazct 2 года назад +28

      @@boldsans1070 brackeys tutorials actually let u learn from it, he explains it carefully in understandable terms.
      dani didnt even show the code

  • @aydam3558
    @aydam3558 4 года назад +506

    Finally someone that can make good unity tutorials with straight to the point explana...
    Brackeys: Am i a joke to you?

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

      he made that game by watching his tutorials
      so....

    • @zeamproduction429
      @zeamproduction429 4 года назад +4

      yes Brackeys, Dani did it better,

    • @SamiTheAnxiousBean
      @SamiTheAnxiousBean 4 года назад +12

      @@zeamproduction429 I have to disagree
      Brackeys and Dani make eaqualy good tutorials

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

      Don’t get me wrong, brack is a good help, but dani makes jumps and cuts so shit goes way faster and simpler

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

      @@SamiTheAnxiousBean I must say that Dani's tutorials makes it more fun and less serious.

  • @EnderElectrics
    @EnderElectrics 4 года назад +765

    Why you don't try make a tutorial (or you can't do that)

    • @DanisTutorials
      @DanisTutorials  4 года назад +186

      uwu

    • @aryansatpathy2404
      @aryansatpathy2404 4 года назад +9

      @@DanisTutorials Ur "Balls?" Tutorial n "Farty Rocket" tutorial?
      N how exactly you optimized it?
      Could u bring it here?.......

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

      @@DanisTutorials nowo youwu

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

      @@DanisTutorials owo

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

      @@DanisTutorials ORAORAORAORAORAORA

  • @mrb1248
    @mrb1248 2 года назад +8

    one thing that would make this 10X better
    sprinting
    but thats simple (if pressing shift set movement speed to sprint speed otherwise movement speed)
    apart from that, it's amazing
    good luck on Karlson

    • @user-mv6gc8mq3j
      @user-mv6gc8mq3j Год назад

      how can i add sprinting 😅

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

      you also need to check if the player isn't in the air, otherwise that would be very weird (sprinting mid air)
      you just gotta add the grounded bool to your if statement

  • @red_dragon_boy1604
    @red_dragon_boy1604 4 года назад +698

    please make a tutorial about wall running i searched every were in youtube and i cant find the perfect one, like so dani can see

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

      @@loco5169 but wallrunning sometimes makes you go up... so i think it would help if you add upward force

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

      @@loco5169 or you could use a SphereCast which is basically a raycast but in the shape of a sphere

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

      @@undefinedchannel9916 NERDS HAVE ENTERED THE CHAT

    • @bigslime2868
      @bigslime2868 4 года назад +26

      @@mufradr nah you are just too dumb to understand our big brains

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

      Q U A C K E R S ur right

  • @stratos2
    @stratos2 4 года назад +84

    Definetly do more tutorials, they really help a lot of people (including myself)

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

      I agree.

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

      I spent 5 hours trying to change my terrain texture to sand so I definitely need some tutorials

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

      I agree

  • @tureh8449
    @tureh8449 4 года назад +282

    Me(new unity user): looking for tutorial for movement takes 7hrs
    Dani: “here take this script”
    Me: oh thanks

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

      Comfy Noodles how do you download the script

    • @joree_
      @joree_ 4 года назад +17

      @Grant Laporte If you don't even know how to download from GitHub, I'm pretty sure you won't be able to code.

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

      @Grant Laporte Nice.

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

      @Grant Laporte how do u download the move camera

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

      @@iiskruzg4136 Sign Up thats what i did

  • @Toons6969
    @Toons6969 3 года назад +261

    Why don’t you make a wall running tutorial (or you can’t do that?)

    • @Meryman_
      @Meryman_ 3 года назад +9

      i dont think he can

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

      ruclips.net/video/Ryi9JxbMCFM/видео.html not by dani but similiar concepts

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

      @@yeetpizza7452 does it work with dani's code?

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

      I wish it was that simple
      I really do

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

      @@pramudia9999 yes I used Dani's code

  • @createria2
    @createria2 4 года назад +341

    if someones here on october it's because they didn't die of depression when brackyes went away

  • @nedmurry
    @nedmurry 4 года назад +28

    Other tutorials: spends the first 2 minutes talking about what they'rs gonna do and how they'll do it.
    Dani: literally starts 14 seconds in.

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

    Wow, I’m impressed with the effort you put into the second half of the video...

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

    I wish he would upload more offend, but since I'm not some brain dead OJ drinker, I understand how hard it is to create content and just wants more from him. Keep up the good work Dani! oh, and merry Christmas

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

      doesnt he basically NEVER uploads on this channel?

  • @timtom5501
    @timtom5501 4 года назад +179

    dani: makes a tutorial on movement
    me: is confused on how he placed boxes

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

      me too. mee too.

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

      Same

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

      lol

    • @timtom5501
      @timtom5501 4 года назад +4

      @@garrybogdanho it was a joke dude

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

      @@garrybogdanho lol k im probs not gonna do it so blame someone else

  • @PoisonIvory088
    @PoisonIvory088 4 года назад +39

    Dani:”Good morning GAMER”
    Me:”thank you kind sir”

  • @l04d1ng...
    @l04d1ng... 4 года назад +91

    I like the fact that he used the old version of his profile pic of the original channel

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

      Yes :)

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

      You know what i like
      -/tutorials/-

    • @gaminganimator-qp2ir
      @gaminganimator-qp2ir 4 года назад

      Ikr

    • @Eh-cv5tt
      @Eh-cv5tt 4 года назад +2

      I mean he hasn't uploaded on this channel in a while. Maybe he forgot it exists lol. Or maybe he just doesn't have anything to upload here.

    • @gaminganimator-qp2ir
      @gaminganimator-qp2ir 4 года назад +1

      @@Eh-cv5tt exactly I am waiting for a new video

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

    Imma be 110% with you, I had no Idea you had a tutorial channel, I've been just watching your videos on repeat to figure out how you did stuff 😅

  • @peno4202
    @peno4202 4 года назад +80

    to anyone confused about the jump functionality: go into the player movement script, find grounded and select it.

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

      yeah but how about the cooldown not working

    • @BolGotronic
      @BolGotronic 3 года назад +8

      Boooring shut up neeeerd (tried to use Dani meme but failed 😐)

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

      A bit late but dont do this, create a layer called Ground if you havent already then take the platform your standing on and layer it ground. Thats what dani does he just doesnt show it.

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

      @@eclipse_ai he says that in the vid

  • @Citroslegend
    @Citroslegend 3 года назад +115

    Dani: "GOOD MORNING GAMERS"
    Me: "Its 6pm ._."

  • @kevinjr.moreira5723
    @kevinjr.moreira5723 4 года назад +27

    I don’t even make games and won’t be using this tutorial but I love your content so I watch it anyway. Keep up the good work! Please make this into a VR game it will be so sick!

  • @BoyOHBoy123
    @BoyOHBoy123 4 года назад +48

    The movement makes me go yes

  • @theearthburner6159
    @theearthburner6159 4 года назад +76

    Dani: Gooood moorning gamers
    PewDiePie watchers: We know what you did there.

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

      wrong he said good morning gamer instead of gamers

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

      *w a t c h e r s*

  • @bisharakhuri2504
    @bisharakhuri2504 4 года назад +251

    WALLRUNNING PLEASE!! like so dani can see :D

    • @infobirdstudios9870
      @infobirdstudios9870 4 года назад +4

      I won't pretend I know how to do it, but in his vid on making Karlson 3D he said he made the character stuck to the wall

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

      3:36 nO

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

    This is actually the best tutorial I've every watched (so far)

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

      yes its sad he is not active on this channel

  • @JimiHomeless28
    @JimiHomeless28 4 года назад +242

    if you want to add a sprinting function to the movement system, i got it here:
    using System;
    using UnityEngine;
    public class PlayerMovement : MonoBehaviour
    {
    //Assingables
    public Transform playerCam;
    public Transform orientation;
    //Other
    private Rigidbody rb;
    //Rotation and look
    private float xRotation;
    private float sensitivity = 50f;
    private float sensMultiplier = 1f;
    //Movement
    public float moveSpeed = 4500;
    public float maxSpeed = 20;
    public bool grounded;
    public LayerMask whatIsGround;
    public float counterMovement = 0.175f;
    private float threshold = 0.01f;
    public float maxSlopeAngle = 35f;
    //Crouch & Slide
    private Vector3 crouchScale = new Vector3(1, 0.5f, 1);
    private Vector3 playerScale;
    public float slideForce = 400;
    public float slideCounterMovement = 0.2f;
    //Jumping
    private bool readyToJump = true;
    private float jumpCooldown = 0.25f;
    public float jumpForce = 550f;
    //Sprinting
    private bool readyToSprint = true;
    //Input
    float x, y;
    bool jumping, sprinting, crouching;
    //Sliding
    private Vector3 normalVector = Vector3.up;
    private Vector3 wallNormalVector;
    void Awake()
    {
    rb = GetComponent();
    }
    void Start()
    {
    playerScale = transform.localScale;
    Cursor.lockState = CursorLockMode.Locked;
    Cursor.visible = false;
    }
    private void FixedUpdate()
    {
    Movement();
    }
    private void Update()
    {
    MyInput();
    Look();
    }
    /// Find user input
    private void MyInput()
    {
    x = Input.GetAxisRaw("Horizontal");
    y = Input.GetAxisRaw("Vertical");
    jumping = Input.GetButton("Jump");
    crouching = Input.GetKey(KeyCode.LeftControl);
    sprinting = Input.GetKey(KeyCode.LeftShift);
    //Sprinting
    if (Input.GetKeyDown(KeyCode.LeftShift))
    Sprint();
    if (Input.GetKeyUp(KeyCode.LeftShift))
    StopSprint();
    //Crouching
    if (Input.GetKeyDown(KeyCode.LeftControl))
    StartCrouch();
    if (Input.GetKeyUp(KeyCode.LeftControl))
    StopCrouch();
    }
    private void StartCrouch()
    {
    transform.localScale = crouchScale;
    transform.position = new Vector3(transform.position.x, transform.position.y - 0.5f, transform.position.z);
    if (rb.velocity.magnitude > 0.5f)
    {
    if (grounded)
    {
    rb.AddForce(orientation.transform.forward * slideForce);
    }
    }
    }
    private void StopCrouch()
    {
    transform.localScale = playerScale;
    transform.position = new Vector3(transform.position.x, transform.position.y + 0.5f, transform.position.z);
    }
    private void Movement()
    {
    //Extra gravity
    rb.AddForce(Vector3.down * Time.deltaTime * 10);
    //Find actual velocity relative to where player is looking
    Vector2 mag = FindVelRelativeToLook();
    float xMag = mag.x, yMag = mag.y;
    //Counteract sliding and sloppy movement
    CounterMovement(x, y, mag);
    //If holding jump && ready to jump, then jump
    if (readyToJump && jumping) Jump();
    //If holding sprint && ready to sprint, then sprint
    if (readyToSprint && sprinting) Sprint();
    //Set max speed
    float maxSpeed = this.maxSpeed;
    //If sliding down a ramp, add force down so player stays grounded and also builds speed
    if (crouching && grounded && readyToJump)
    {
    rb.AddForce(Vector3.down * Time.deltaTime * 3000);
    return;
    }
    //If speed is larger than maxspeed, cancel out the input so you don't go over max speed
    if (x > 0 && xMag > maxSpeed) x = 0;
    if (x < 0 && xMag < -maxSpeed) x = 0;
    if (y > 0 && yMag > maxSpeed) y = 0;
    if (y < 0 && yMag < -maxSpeed) y = 0;
    //Some multipliers
    float multiplier = 1f, multiplierV = 1f;
    // Movement in air
    if (!grounded)
    {
    multiplier = 0.5f;
    multiplierV = 0.5f;
    }
    // Movement while sliding
    if (grounded && crouching) multiplierV = 0f;
    //Apply forces to move player
    rb.AddForce(orientation.transform.forward * y * moveSpeed * Time.deltaTime * multiplier * multiplierV);
    rb.AddForce(orientation.transform.right * x * moveSpeed * Time.deltaTime * multiplier);
    }
    private void Jump()
    {
    if (grounded && readyToJump)
    {
    readyToJump = false;
    //Add jump forces
    rb.AddForce(Vector2.up * jumpForce * 1.5f);
    rb.AddForce(normalVector * jumpForce * 0.5f);
    //If jumping while falling, reset y velocity.
    Vector3 vel = rb.velocity;
    if (rb.velocity.y < 0.5f)
    rb.velocity = new Vector3(vel.x, 0, vel.z);
    else if (rb.velocity.y > 0)
    rb.velocity = new Vector3(vel.x, vel.y / 2, vel.z);
    Invoke(nameof(ResetJump), jumpCooldown);
    }
    }
    private void ResetJump()
    {
    readyToJump = true;
    }
    private void Sprint()
    {
    if (grounded && readyToSprint)
    {
    readyToSprint = false;
    //Apply sprint to player
    maxSpeed = 9;
    }
    }
    private void StopSprint()
    {
    maxSpeed = 5;
    readyToSprint = true;
    }
    private float desiredX;
    private void Look()
    {
    float mouseX = Input.GetAxis("Mouse X") * sensitivity * Time.fixedDeltaTime * sensMultiplier;
    float mouseY = Input.GetAxis("Mouse Y") * sensitivity * Time.fixedDeltaTime * sensMultiplier;
    //Find current look rotation
    Vector3 rot = playerCam.transform.localRotation.eulerAngles;
    desiredX = rot.y + mouseX;
    //Rotate, and also make sure we dont over- or under-rotate past +-90 degrees.
    xRotation -= mouseY;
    xRotation = Mathf.Clamp(xRotation, -90f, 90f);
    //Perform the rotations
    playerCam.transform.localRotation = Quaternion.Euler(xRotation, desiredX, 0);
    orientation.transform.localRotation = Quaternion.Euler(0, desiredX, 0);
    }
    private void CounterMovement(float x, float y, Vector2 mag)
    {
    if (!grounded || jumping) return;
    //Slow down sliding
    if (crouching)
    {
    rb.AddForce(moveSpeed * Time.deltaTime * -rb.velocity.normalized * slideCounterMovement);
    return;
    }
    //Counter movement
    if (Math.Abs(mag.x) > threshold && Math.Abs(x) < 0.05f || (mag.x < -threshold && x > 0) || (mag.x > threshold && x < 0))
    {
    rb.AddForce(moveSpeed * orientation.transform.right * Time.deltaTime * -mag.x * counterMovement);
    }
    if (Math.Abs(mag.y) > threshold && Math.Abs(y) < 0.05f || (mag.y < -threshold && y > 0) || (mag.y > threshold && y < 0))
    {
    rb.AddForce(moveSpeed * orientation.transform.forward * Time.deltaTime * -mag.y * counterMovement);
    }
    //Limit diagonal running. This will also cause a full stop if sliding fast and un-crouching.
    if (Mathf.Sqrt((Mathf.Pow(rb.velocity.x, 2) + Mathf.Pow(rb.velocity.z, 2))) > maxSpeed)
    {
    float fallspeed = rb.velocity.y;
    Vector3 n = rb.velocity.normalized * maxSpeed;
    rb.velocity = new Vector3(n.x, fallspeed, n.z);
    }
    }
    /// Find the velocity relative to where the player is looking
    /// Useful for vectors calculations regarding movement and limiting movement
    public Vector2 FindVelRelativeToLook()
    {
    float lookAngle = orientation.transform.eulerAngles.y;
    float moveAngle = Mathf.Atan2(rb.velocity.x, rb.velocity.z) * Mathf.Rad2Deg;
    float u = Mathf.DeltaAngle(lookAngle, moveAngle);
    float v = 90 - u;
    float magnitue = rb.velocity.magnitude;
    float yMag = magnitue * Mathf.Cos(u * Mathf.Deg2Rad);
    float xMag = magnitue * Mathf.Cos(v * Mathf.Deg2Rad);
    return new Vector2(xMag, yMag);
    }
    private bool IsFloor(Vector3 v)
    {
    float angle = Vector3.Angle(Vector3.up, v);
    return angle < maxSlopeAngle;
    }
    private bool cancellingGrounded;
    /// Handle ground detection
    private void OnCollisionStay(Collision other)
    {
    //Make sure we are only checking for walkable layers
    int layer = other.gameObject.layer;
    if (whatIsGround != (whatIsGround | (1

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

      cool

    • @afterglow7984
      @afterglow7984 4 года назад +23

      thats a lot of code

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

      @@afterglow7984 i know right

    • @develooper1052
      @develooper1052 4 года назад +12

      OMG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      WTF THAT'S MORE THAN 99 MISTAKES
      but it's cool.

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

      thx

  • @YxssineVids
    @YxssineVids 4 года назад +37

    Please upload more on this channel it helps a lot also some 2d and pixel games too and thanks bro

  • @phee3D
    @phee3D 4 года назад +34

    Hey, thanks for the tutorial. I really love the movement in this game.
    One suggestion I can give is to use more realistic weights and dimensions to get expected results and just to avoid confusing yourself once the code gets complex.
    For example, you increased the gravity and used a mass of 1.5kg on the player because the jump was too big instead of increasing the mass to a more realistic value such as 65kg. Now you have a gravity that you can find no reference to and compare to. Which also means you will have to adjust the weight of all your rigid body's without any reference to real life to emulate a similar behavior to the actual world.

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

      thanks

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

      actually this is a problem that i suffer too and noticed in this tutorial that i need fix hehe... i just need absord what is good here and put on my own code...

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

    Dude just got included in a playlist made by unity

  • @ksoup1291
    @ksoup1291 4 года назад +270

    Why don't you make a 4D game (or you can't)

    • @vitkozel
      @vitkozel 4 года назад +9

      or 5D (or you can't)?

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

      Pleas send me a Foto from youre dimension

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

      @@vitkozel Pleas you too

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

      @@regenjacob ok no problem

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

      Brackeys can do it

  • @BishalKhan01
    @BishalKhan01 4 года назад +84

    Hey, you should make a tutorial on how you made the grappling hook, it would help a lot of people and also me.

  • @demhomies9447
    @demhomies9447 4 года назад +11

    The funny thing is that I figured out the movement script myself but the camera is what got me stuck. Thanks for letting us use ur scripts

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

      The player movement have so many errors. Can you send me your code please?

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

      Veight V8 yeah, gimme a sec

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

      Veight V8 how should I send it to you? Just by typing it all?

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

      @@demhomies9447 yes.

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

      @@veight_
      Dude

  • @WasteTimeYT
    @WasteTimeYT 10 месяцев назад +1

    You know there's someone out there who finds out this tutorial useful

  • @ibeblendin2892
    @ibeblendin2892 4 года назад +4

    For all those who's scripts have compile errors, Just make sure you are using Unity version 2019. Fixed all my problems.
    Also, if you are falling through the map. make sure you have box colliders, mesh filter (with the object selected) and mesh renderer. If you import your own object from blender or something, they wont have those by default most likely. Hope this helps.

  • @despresseddodo1722
    @despresseddodo1722 4 года назад +109

    Soooo...i am 13 years old and i am gonna begin my coding creer and i am so thankfull that your here just keep the good work :)

  • @MisterPogman
    @MisterPogman 4 года назад +9

    _Dani proceeds to make a tutorial channel_
    *Dani proceeds to tell everyone he doesn’t know how to make tutorials *

  • @takikun1427
    @takikun1427 Год назад +4

    I've yoinked this code more than 50 times since past 3 years

  • @cessposter
    @cessposter 4 года назад +41

    Evolution of my projects:
    My first game
    3d test
    2d test
    Test
    Untitled project
    Unity is hell

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

      "Evoloution"

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

      Damn this is so true for me as well

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

      @@arrrnora *Evolution

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

      facts mine are similar to this too, coding makes me go insane (not in a good way)

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

      Woah that's way too relatable.

  • @borismedic2344
    @borismedic2344 4 года назад +186

    Why don't you make a tut for total begginers,like for us who don't even know how to use unity ? :D

  • @Spectr3x
    @Spectr3x 4 года назад +11

    Nice! Looking forward to that wall-running tutorial

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

      *Last Online 6 Months Ago*

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

    I think putting the NoFriction physics material on the player and setting the friction combine to minimum achieves the same effect as putting the physics material on every object

  • @SnowyFoxlinn
    @SnowyFoxlinn 4 года назад +66

    I am sad he didn't say "And, can I just say that he look *T H I C C* " when he created the capsule...

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

      same

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

      its not and, can i just say that he look thicc its "is it just me or karlson be lookin kinda *T H I C C* "

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

      * sad capsule nioses *

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

      is it me or foxlynn face looking *T H I C C*

    • @godot-boy7694
      @godot-boy7694 4 года назад

      I think he's not our Dani.

  • @Luna0864-v9i
    @Luna0864-v9i 4 года назад +44

    Hey Dani! Do a grappler tutorial pls ^^

  • @snootfriedchickenyt5004
    @snootfriedchickenyt5004 4 года назад +14

    dani sounds way different when hes educational

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

    Ok not gonna lie, this actually helped a ton in my current game I'm working on!

  • @adithyasriram7955
    @adithyasriram7955 4 года назад +39

    Capsule : Cringe
    BeAn : THICC
    Dani : idk MiLk?
    Hotel : Trivago

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

      yes

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

      hotel trivago? tu é brasileiro? kkkk

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

      @@charcoalwill kkkkkkkk verdade, mano deixa eu te perguntar uma coisa, voce conseguiu fazer o tutorial? pra mim ficou meio zoado e de vez em quando eu to andando e sou jogado pra outra direção, ja vi os comentarios e um monte de gente teve o mesmo problema, pra tu deu certo?

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

      Hotel trivago is the funniest thing i see on every youtube video coment section.

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

      dani = stronk bone (lot of milk)

  • @unfreezedfreezer9455
    @unfreezedfreezer9455 4 года назад +32

    instruction unclear: my character fly

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

      Turn on gravity under rigid body

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

      @GI Dev Turn on gravity under rigid body

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

      Hahaha

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

      @@TheXcizer I turned on Rigid-Body Gravity it still no work, the minute it starts the character flys away.

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

      Is this a joke or a serious problem

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

    amazing tutorial ngl, straight to the point and very simple

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

      Here is a good one ---> ruclips.net/video/Nx73K5qiTPc/видео.html

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

    im making a unity project for fun and remembered dani got a tutorial channel, and it worked

  • @me-up6fk
    @me-up6fk 3 года назад +4

    This tutorial is so straight forward, even for a rookie like me who literally has barely any unity knowledge this was still really easy to follow along with!
    5 star yelp review

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

      yes it was easy but thats because you weren't the one CODING then ur opinion on unity will drastically change

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

      but yes 5 star yelp review

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

      I can't do it I guess i have the brain of a 4 year old

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

    Dani please make a VR game about drinking as much milk as you can in a minute it will be great

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

      Bruh that's a terrible idea

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

    Dami:Tecnical problems
    Me you jokeing right

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

    Me waiting for 2 years to find another freaking Danis tutorial upload

  • @viledeg2569
    @viledeg2569 3 года назад +14

    To get velocity relative to look direction you could just do this:
    camera.transfrom.rotation * camera.transform.TransformDirection(rigidbody.velocity)
    And to avoid jitteriness at 4:55 you could just replace Update with LateUpdate.
    Also at 6:55 you add gravity with ForceMode.Force but gravity does not take mass into acount so you should've used ForceMode.Acceleration but notice that both these modes already multiply the value you pass in by Time.deltaTime so you don't have to multiply them once more.

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

      🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓🤓

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

      U have anything that can make my gun that is childed to the camera not stretch with the camera?

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

      @@Charduza Make aother camera for the weapon. There will be one weapon for the environment and everything, and one for the gun.

  • @harlowmitch7698
    @harlowmitch7698 3 года назад +13

    I swear you taught me better than brackeys

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

      you didn't say that

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

      @@maniainteractive Sorry but yes, cause brackeys melee tutorial isn't even a quarter of this

  • @axel5811
    @axel5811 3 года назад +13

    Day 393: still waiting on Dani's next tutorial :(

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

    Dani: i dont know how to explain things
    Me: this is the only tutorial i could find that worked.

  • @WacWac04
    @WacWac04 4 года назад +19

    Can you do a ragdoll phisics tutorial, because ragdoll make me ya

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

    Can we get some F in chats so dani can bring back dani's tutorials

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

    0:41 AWW MANN
    Greetings from Poland 😀🇵🇱🇵🇱🇵🇱

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

    If dani ever comes back from the dead he better make more tutorials

  • @vladigamertad8298
    @vladigamertad8298 4 года назад +4

    Very cool tutorial. I really like it.

  • @alexwasfound7669
    @alexwasfound7669 4 года назад +23

    I just wanna annoy Dani :v
    *What browser do u use???????*

  • @crasy9182
    @crasy9182 4 года назад +15

    I'm having a bit of trouble as when I run the game the camera will not follow, I'm new to unity and id like some help

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

      Make sure you attached the main camera to the empty camera object, and if so make sure you set the camera object as the camera in the player camera follow script

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

      @@iequalzero716 hi yoda

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

      @@tamlin434 Yoda Lego You To

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

      @@iequalzero716 how

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

      same here man

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

    Dani : {High Volume} Oh, you don't know what Kalson is!!!!!!!!!!
    Dani 2 : {High Volume} Orange Juice Crinch
    Dani Tutorials : {Normal Volume}

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

    could you also make a tutorial, for a 2d stickman, since I’m kind of learning unity and wold like to have a Skript like that, so I would know how
    (or you can’t make it(jk I know off the sticks since 3rd video));

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

    I got an error (4), could someone help me please?
    - Assets/PlayerMovement.cs(161,20): error CS1644: Feature `nameof operator' cannot be used because it is not part of the C# 4.0 language specification
    - Assets/PlayerMovement.cs(247,35): error CS1061: Type `UnityEngine.Collision' does not contain a definition for `contactCount' and no extension method `contactCount' of type `UnityEngine.Collision' could be found. Are you missing an assembly reference?
    - Assets/PlayerMovement.cs(254,30): error CS1644: Feature `nameof operator' cannot be used because it is not part of the C# 4.0 language specification
    - Assets/PlayerMovement.cs(262,20): error CS1644: Feature `nameof operator' cannot be used because it is not part of the C# 4.0 language specification

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

      Zebax 22 I also had the same problem but I have been able to fix one of them. Just go to edit, project settings, player, other settings, and under configuration you will see, “scripting runtime version” and change it from .NET 3.5 Equivalent to .NET 4x Equivalent. Make sure to save before doing this. As for the other problem I am not sure.

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

      @@meatburger6910 Thanks for the help!

  • @mrgio3870
    @mrgio3870 4 года назад +87

    We demand you to make a Vr Game!
    (Not original comment just helping spamming and you should too)

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

      no, you shouldn't spam

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

      I dont acctualy have controllers for my VR so... lol

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

      We demand you to make a Vr Game!
      (Not original comment just helping spamming and you should too)
      you're welcome

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

      he just did xdddd

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

    Me: hoping to learn sone code with dani
    Dani: just copy and paste this into unity

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

    Can you make a tutorial about how you created the ragdoll stickman from off the sticks (with movement and this stuff), really appriciated if you will :)

  • @harryhopkinson162
    @harryhopkinson162 4 года назад +4

    Hey Dani love your videos, I have been wondering how to change your taskbar to the way you have. It is a nice colour and I have not found out anywhere online how to change it like that.
    Thank you a lot.

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

    Dani Everything i just perfect
    But the player control script has alot of errors....
    What Should i do?

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

      Yes. I can't move forward or backwards without holding left or right. I can't jump or crouch and I can't slide, pls help uwu

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

      @@mrcrazyderp6955 what does mean "uwu" ?

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

      I dunno actually

  • @mr.mystical9776
    @mr.mystical9776 3 года назад

    I JUST REALIZED THERES A TUTORIAL FROM DANI THIS IS HOLY

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

    When will we get tutorials like Guns from Karlson or Wall running

  • @actros_l8567
    @actros_l8567 4 года назад +33

    Why don't you make a unity's particle system toturial ? ( OR YOU CAN'T DO THAT ! )

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

      Yessss

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

      oh i see you got a nice taste sir.

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

      Assalamualaikum arab Mario
      I would talk in Arabic but I dont know Arabic even tho I live in an Arabic country Which is bahrain

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

      @@smd9591 ok.

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

      @ايمن خضير لول

  • @j-hackhammer6078
    @j-hackhammer6078 4 года назад +4

    please do more tutorials, i'm actually interested in making games with Unity for PC
    i'd like you to make a tutorial about how to implement health, weapons and so on
    subbed :)

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

    i expected him to make the capsule thicc good job gamer

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

    The player movement script dosnt work it says "feature `nameof operator` cannot be used becouse it is not part of the C# 4-0 language specification

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

      Got the same issue.

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

      Same

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

      Same, Did you figure it out?

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

      @@rohitrana2312idk yes if you have the same problem update unity to 2020 version. I had it on 2018 and it didnt work.

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

      @@JustAspect22 Oh so it is because of the old version, I have 2017 version. Thanks, I will upgrade it to 2020 version :)

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

    this makes me go yes

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

    Here's something I don't understand about the movement code, maybe someone can clarify:
    in the movement script, Dani has the FindVelRelativeToLook() method. Why? You could easily just... rotate the player around the Y axis and move the player relative to itself instead of doing complicated angle math based on where you're looking and how you're moving? Am I missing something?

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

      Well the FindVelRelativeToLook is actually used for countermovement, but there is a better way of doing it. you can just say:
      Vector3 FindVelRelativeToLook = orientation.InverseTransformDirection(rb.velocity);

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

      @@Deoster oh, that makes a lot more sense-

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

    No one will talk about the disappointment when he said capsule
    We want BEAN

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

    me: types exactly what is in the script
    unity: 4 errors take it or leave it

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

      If your still getting errors there's a git hub page
      if you copy and paste there are no errors

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

      @@jackpowell7906 what github Page?

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

      In the description

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

      Help me the player won’t rotate pls

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

      there is three actually

  • @lesserlobster8336
    @lesserlobster8336 3 года назад +7

    I'm making a similar rigidbody based movement system, and I'm wondering something: how do you prevent the player from moving through walls? I've set up my movement and such, but when I move into walls I just pass through them if I move into them fast enough. If anyone happens to see this, can you please offer some advice? Thanks for your time.

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

      rigidbody, collision detection continuous,hope be helpful

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

      @@skybig9906 I've tried that, but it still doesn't work. Thanks though.

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

      @@lesserlobster8336 i have the same problem

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

      Did you set them as ground?

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

    0:43 top 10 minecraft youtubers, who’ve SWORN

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

    R.I.P DanisTutorials it is the best tutorial video ever

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

    This makes me say yes

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

    best tutorial ever 8 minutes and we done and i looked and it was half way through the vid when we was finished with the movement big thumb up

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

    where did you learn all of this I cant understand most of the things in the script and need a more in-depth tutorial?
    love your videos, you're the reason I started coding

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

      try to learn from brackeys even if he left he has alot of amazing tuorials

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

    Please make a off the sticks ragdoll tutorial

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

    thank you dani for helping me pass my college class

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

    Im gonna yoink your code as payback for you yoinking everyone else's code XD

  • @xerva8390
    @xerva8390 4 года назад +9

    Pls make a part 2 with wall running or how the guns works!!!!

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

      Guns are easy to do just watch brackeys guns / reloading video

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

      @@billblap2231 somehow I don't know how to use it from brakeys I don't understand anything

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

    Can you make a 4d game, or you can’t

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

    They actually gave karlson a youtube gaming page! good job