Check out the full tutorial playlist📋: ruclips.net/p/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP Download the Top Down Template🐸: gamecodelibrary.itch.io/top-down-2d-base-template Get all source code‼: www.patreon.com/c/GameCodeLibrary Enjoy!!
Thank you!! The end music is cozy right! It's from a pokemon mystery dungeon game - which I've only played one of way back when I was young haha! Just found it when looking for a new theme to use online :-)
Something to keep in mind when using the `Update()` function in unity, is `Time.deltaTime()`. You'll want to multiply by that when moving your player around to keep the experience smooth across multiple systems whose specs may differ and effect the framerate. Really like the format of your videos and your energy. Thanks so much!
Sorry for the late reply!!! The only thing I can think of is at 4:40 I import the using UnityEngine.InputSystem; Here's the full script from my video :') using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class PlayerMovement : MonoBehaviour { [SerializeField] private float moveSpeed = 5f; private Rigidbody2D rb; private Vector2 moveInput; // Start is called before the first frame update void Start() { rb = GetComponent(); } // Update is called once per frame void Update() { rb.velocity = moveInput * moveSpeed; } public void Move(InputAction.CallbackContext context) { moveInput = context.ReadValue(); } } Otherwise perhaps Unity Input System didn't download properly! perhaps try redownloading and opening and closing Unity. Hope you're well!
Hello, i followed this tutorial and the movement works awesome in my game, however, when i build the game to test the game out on my pc (with the .exe ) the controls don't work, nothing happens, there's no error in the console or anything, right now i have the same exact code as you at the end of #2 of this video, so i'm not sure what could be the issue, thanks :)
Check out the full tutorial playlist📋: ruclips.net/p/PLaaFfzxy_80HtVvBnpK_IjSC8_Y9AOhuP
Download the Top Down Template🐸: gamecodelibrary.itch.io/top-down-2d-base-template
Get all source code‼: www.patreon.com/c/GameCodeLibrary
Enjoy!!
Great concise tutorial, looking forward to continuing with the series!
So glad you enjoyed! :-)
Another fire video. That ending music just bring nostalgia. Keep at it!
Thank you!! The end music is cozy right! It's from a pokemon mystery dungeon game - which I've only played one of way back when I was young haha! Just found it when looking for a new theme to use online :-)
I wish more tutorials were like this. thank you.
You’re welcome I’m so glad you enjoyed!
Something to keep in mind when using the `Update()` function in unity, is `Time.deltaTime()`. You'll want to multiply by that when moving your player around to keep the experience smooth across multiple systems whose specs may differ and effect the framerate. Really like the format of your videos and your energy. Thanks so much!
I've been looking for some help with the "new" input system, this is great, thank you!
Glad you enjoyed!! :-)
Thanks for this video! Im so excited for this top down series 🎉🎉
You're welcome!! The episodes should get more and more exciting as they go along :-)
finally a recent video that works T_T
Hello! I love this video so far! I am having trouble though at 5:52 , there is no option to press Move :( Do you have any ideas of what I did wrong?
Sorry for the late reply!!! The only thing I can think of is at 4:40 I import the using UnityEngine.InputSystem;
Here's the full script from my video :')
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float moveSpeed = 5f;
private Rigidbody2D rb;
private Vector2 moveInput;
// Start is called before the first frame update
void Start()
{
rb = GetComponent();
}
// Update is called once per frame
void Update()
{
rb.velocity = moveInput * moveSpeed;
}
public void Move(InputAction.CallbackContext context)
{
moveInput = context.ReadValue();
}
}
Otherwise perhaps Unity Input System didn't download properly! perhaps try redownloading and opening and closing Unity.
Hope you're well!
Did you make sure the move function is set to public?
Hello, i followed this tutorial and the movement works awesome in my game, however, when i build the game to test the game out on my pc (with the .exe ) the controls don't work, nothing happens, there's no error in the console or anything, right now i have the same exact code as you at the end of #2 of this video, so i'm not sure what could be the issue, thanks :)
I usually use GetAxisRaw to get instantaneous movement without acceleration or deceleration, does the new input system have an equivalent approach?
The context.ReadValue(); should give you the current value of the input axis without any smoothing, so it should be the same behavior of GetAxisRaw!
when i type input action it is working but in unity it shoves error (there is no red underline under InputAction)
Have you installed the Unity Input System package shown at 2:40?
What is the error it's showing?
Oh i figured it out. ineeded to add using UnityEngine.InputSystem;
@@adriandvoracek2305 Hurray nice!