Open World Tutorial Series - Creating the Movement Code

Поделиться
HTML-код
  • Опубликовано: 25 апр 2019
  • Join our Filmstorm Motion Library: / filmstorm
    In this first lesson, we setup a completely code driven movement system which handles gravity, input turn rotation relative to the forward camera direction.
    #unity #openworld #filmstorm
    Download the resource and project files here: filmstorm.net/blogs/tutorials...
    This is the best way to drive a third person character with simplicity and code efficiency and is also supported in the latest Unity 2019 build.
    We will be creating a fully open world game from scratch as requested by many viewers.
    ---------------------------------------------------------------------------------------------------------
    Our latest products from Gumroad are:
    GTA Animation Pack and Tutorial: gum.co/gtapack
    Sword Hack & Slash Animation Pack: gum.co/ninjas
    Assassin's Creed Climbing System - Unity3D (BETA): gum.co/acclimb
    ------------------------------------------------------------------------------------------------------
    Thanks for checking out my tutorials, I really appreciate it. If you want to take your Filmstorm experience to the MAX, check out www.filmstorm.net for more free assets and project downloads today!
    Current Projects:
    GTA Single Player System: • Single Player GTA Unit...
    FPS System: • FPS in Playmaker Game ...
    3rd Person Character Movement: • Third Person System Tu...
    2.5D Player System: • 2.5D Character System ...
    -----------------------------------------------------------------------------------------------------------
    Have more suggestions for content? Leave a comment below and let me know what you want to see.
  • КиноКино

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

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

    i was struggling to make my character face the direction he moved in rather than reverting back to his original direction. I'm so glad i found this, probably the best tutorial out there..clear explanations and examples to follow. I can't wait to see the rest of the series, keep up the good work! :)

  • @alberto-martino
    @alberto-martino 5 лет назад +20

    I'm looking forward to see next partsss!! 🤯🍻

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

    Brilliant! Was looking forward to this.

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

    Great tutorial!
    I'm looking forward to the next episode

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

    Great tutorial! Can't wait to watch the rest. Thanks!

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

    I figured out my issue. Thanks for these amazing videos! Very Informative and goes into detail about how it all works together keep up the good work

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

    Really happy seeing a video from you

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

    Little late to watch, but one of the best tutorials for 3d character movement I have personally seen thank you so much!

  • @michelveraliot
    @michelveraliot 5 лет назад +21

    Im a pro développer of Unity because of you and others youtuber its Been 3 year and i will forever support you're Channel , i missed the Time when i was a noob and i Always looked at ur Channel.
    Good continuation

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

      Thanks Veraliot, I really appreciate you taking the time to write this comment :D

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

      @@Filmstorm You're welcome i wish you a good road on this life ^^

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

    That's what i need. Waiting new videos..

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

    I really hope to this project keep going. I combined this and another tutorial to make a movement system that really works for my project, I can't wait to learn more.

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

      What was the other tutorial you found? I've been looking for days trying to figure out how to get the character to move straight horizontally in relation to the camera when I press "a" or "d" instead of having him run in circles around the camera.

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

      @@DRYstudios1994 oh sorry, the other tutorial was for flight, I cant help there

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

    Damn, how am i just finding this now?! cant wait to see whats next

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

    looking forward also for this sir

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

    Exactly what I wanted

  • @Lee-rc2jy
    @Lee-rc2jy 4 года назад +2

    devastated that you didnt continue this series

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

    please bro we needed this tutorial

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

    kind of a shame there's no second episode to this series, but thanks a lot for your help!

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

    Glad to see you back
    Please make tutorial on how to make car Enter and Exit system with animations

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

    @Filmstorm hi thanks for the tutorial i did everything to the tee and its works exactly how you intended, 2 questions is this still one of the best ways to have a camera setup? and if you could tell me shortly what path i should take to animate this, does it require more code?or do i simply make my own animations and set them up with unity its self?

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

    Are you gonna add add a character with animation in the future in this controller?

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

    The movement code isn't the hardest part.
    Unity is lack of a proper solution system for managing large terrain. I hope I can learn something from this tutorial series.

  • @thewassim-647
    @thewassim-647 Год назад

    Thank's aloooooooooooooooooot

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

    Hi !
    Thank for your tutorial, it works great !
    I have a questions for you if you don't mind
    When I go left and hold, the camera doesn't follow the target "horizontally", it makes a slow rotation which changes the initial target destination of the left input after a while. How to make it sticks completely to the character movement?
    Thanks again and have a good day !

  • @shonik-cm6kn
    @shonik-cm6kn 5 лет назад +3

    Nice video, but only one video yet? (In this Tutorial Series)

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

    Add it to a playlist if not already added it would be helpful . Thank you cheers

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

      Yes we will add it to the Playlist. 👍🏼

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

    Tnx

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

    When will the next tutorial/episode come out?

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

    Will you add a cover system in this project?

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

    thank you for the tutorial. my only issue is the cinemachine didn't go to the top like shown :')

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

    Still Waiting for more parts.....

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

    👍👍👍

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

    Hi, how do i add jump function to this? please reply, thanks!

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

    This is good stilll, but we wanna see more playmaker tutorialssss

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

    Will this series continue? :'(

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

    How do you get the scene lighting like you have it (with a global light and no shadows, etc). My default scene lighting looks nothing like yours. thanks!

    • @user-vz8gr7qx6p
      @user-vz8gr7qx6p 3 года назад

      Open Window (at top of unity) > Rendering > Lighting Settings
      it will open a window , in Environment lighting Section Change The Source , From SkyBox To color or gradient

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

    character controller
    When I put my character, my character's own collider is disabled. How do I fix this? Thanks!

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

    So, what I'm having a problem with is that the character is moving faster when moving diagonally. I tried figuring out where to normalize it (if that is possible), but couldn't figure it out.

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

    What if I don't want the capsule to follow the rotation of the camera?

  • @user-kf7my6tg7i
    @user-kf7my6tg7i 4 года назад +2

    Great video but hard to watch on a 1080p display..

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

      True, should make the text larger?

    • @user-kf7my6tg7i
      @user-kf7my6tg7i 4 года назад

      @@Filmstorm that would help a lot :)

  • @Lama-we9sd
    @Lama-we9sd 2 года назад

    I can't access the project files on the website. I get a 404 error when i open the link.

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

    You some very interesting videos on your channel the only downside is that you don't upload videos regularly !

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

    Resource and project files is now not availible? I get a 404 error when I try to follow a link.

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

      Hey let me look into it and I’ll get a new link online for you

  • @2fat2hide64
    @2fat2hide64 5 лет назад

    The link inthe discription doesnt work anymore

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

    Where are the other parts?? 🤔

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

    hey can you please update the Open World Animations please, for example, add interaction animations, or something else. Because the Open World Animations are the same price as the adventure kit, and it is much better I just didn't know about it when I bought the Open World.

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

    Could you Show how to add a Charakter?

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

      Coming up in the new tutorials!

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

    excuse me...!!!! your resource file not exist, if i like follow you, how i work if you don't have the resource file ?

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

    Where's the next tutorial :..D

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

      Oh my, it is time for a new one isn’t it. 🚀

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

    so many good videos by unity2019 HDRP,but open games(hdrp) less less less'''''''''

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

      We are covering the HDRP setup and implementation in the next couple of tutorials 👍🏼

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

    Why is my character moving so fast Plz help

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

    After seeing this I watched it like 20 times after and never noticed that 2nd bit on gravity you put in well turning it to gravity Multiplayer you put something in that I can't see. I then went on my own taking a note from one of your other tuts and added a animator witch worked quite well but then instead of waiting I tried to figure out jump asked some friends and it just kinda boiled down to breaking the code and all the gravity so back to square one and maybe just wait for the jump video....

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

      To be kinda clear at 26:32 I'm guessing the Private Float with the InputX, Input Z and Speed is where you put a Gravity call.

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

    14:40 and this is all I see
    NullReferenceException: Object reference not set to an instance of an object
    MovementController.MovementManager () (at Assets/Scripts/MovementController.cs:32)
    MovementController.Update () (at Assets/Scripts/MovementController.cs:24)
    17:56
    NullReferenceException: Object reference not set to an instance of an object
    MovementController.MovementManager () (at Assets/Scripts/MovementController.cs:47)
    MovementController.InputDecider () (at Assets/Scripts/MovementController.cs:40)
    MovementController.Update () (at Assets/Scripts/MovementController.cs:29)

  • @user-vz8gr7qx6p
    @user-vz8gr7qx6p 3 года назад

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(CharacterController))]
    public class MovmentsController : MonoBehaviour
    {
    private float InputX, InputY, Speed;
    private Camera cam;
    private CharacterController characterController;

    private Vector3 desiredMoveDirection;
    [SerializeField] float rotationSpeed = 0.3f;
    [SerializeField] float allowRotation = 0.1f;
    [SerializeField] float movmentsSpeed = 1f;
    [SerializeField] float gravity;
    // Start is called before the first frame update
    void Start()
    {
    characterController = GetComponent();
    cam = Camera.main;
    }
    // Update is called once per frame
    void Update()
    {
    InputX = Input.GetAxis("Horizontal");
    InputY = Input.GetAxis("Vertical");
    MovmentsManager();
    InputDecider();
    }

    void InputDecider(){
    Speed = new Vector2(InputX, InputY).sqrMagnitude;
    if(Speed > allowRotation){
    RotationManager();
    }
    else{
    desiredMoveDirection = Vector3.zero;
    }
    }
    void RotationManager(){
    var forward = cam.transform.forward;
    var right = cam.transform.right;
    forward.y = 0;
    right.y = 0;
    forward.Normalize();
    right.Normalize();
    desiredMoveDirection = forward * InputY + right * InputX;

    transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(desiredMoveDirection), rotationSpeed);
    }

    void MovmentsManager(){
    gravity -= 9.8f * Time.deltaTime;
    Vector3 moveDirection = desiredMoveDirection * (movmentsSpeed * Time.deltaTime);
    moveDirection = new Vector3 (moveDirection.x, gravity, moveDirection.z);
    characterController.Move(moveDirection);
    if(characterController.isGrounded)
    {
    gravity = 0f;
    }
    }
    }

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

    wen sprint and jump? 😂

  • @Lou-hf8zt
    @Lou-hf8zt 4 года назад

    hiiiiiiiii

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

    What's with the video quality?! Am I only one getting only 360p or?

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

      Still processing! Hope it’s done soon 👍🏼

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

    I would like to use this without CharacterController ... :/

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

      Would you rather move the character with physics instead? I can write a custom piece of code for you to get it working 👍🏼

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

      @@Filmstorm Exactly, I'm trying to make a Hack and slash, I really like your tutorials but I always want to change something hahaha, if you can help I'll be grateful !!

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

      No problems, give me a bit and I’ll get something back to you.

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

      Thank you very much, I'll be waiting !!

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

      @@roundzerodev did you get a response?

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

    Could you tell me the pc requirements for unity or ue4

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

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    [RequireComponent(typeof(CharacterController))]
    public class PlayerMovment : MonoBehaviour
    {
    private float InputX;
    private float InputZ;
    private float Speed;
    private Camera cam;
    private CharacterController characterController;
    private Vector3 MoveDiracsion;
    [SerializeField] float rotationSpeed = 0.0003f;
    [SerializeField] float alloRotasion = 0.0001f;
    [SerializeField] float MovmentSpeed = 0.0001f;
    // Start is called before the first frame update
    void Start()
    {
    characterController = GetComponent();
    cam = Camera.main;
    }
    // Update is called once per frame
    void Update()
    {
    InputX = Input.GetAxis("Horizontal");
    InputZ = Input.GetAxis("Vertical");
    InputDecider();
    MovementManeger();
    }
    void InputDecider(){
    Speed = new Vector2(InputX, InputZ).sqrMagnitude;
    if(Speed > alloRotasion){
    RotationManeger();
    }else{
    MoveDiracsion = Vector3.zero;
    }
    }
    void RotationManeger(){
    InputX = Input.GetAxis("Horizontal");
    InputZ = Input.GetAxis("Vertical");
    var camForward = cam.transform.forward;
    var camRight = cam.transform.right;
    camForward.y = 0;
    camRight.y = 0;
    camForward.Normalize();
    camRight.Normalize();
    MoveDiracsion = camForward * InputZ + camRight * InputX;
    transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(MoveDiracsion), rotationSpeed * Time.deltaTime );
    }
    void MovementManeger(){
    Vector3 DesierdMoveDiracsion = MoveDiracsion * Time.deltaTime;
    characterController.Move(MoveDiracsion);
    }
    }
    why is my character moving so fast plz someone help