Unity 2D MOVEMENT Tutorial with New Input System | Unity 2D Platformer Tutorial #1

preview_player
Показать описание
In this Unity 2D Tutorial we're gonna do Player movement system with New input system.
First tutorial of make a game series.
we're gonna do 2D Platformer game with unity in the make a game series.

Enjoy the video ☕
————————————————————————————
🖐 Hi Game developer
Welcome to Rehope Games I'm Murat

I share unity tutorial videos on my channel. if you want to make a game with unity (especially 2d platformer game), the videos here will definitely interest you.

————————————————————————————

#unitytutorials, #unity2d, #unity2dplatformer
Рекомендации по теме
Комментарии
Автор

Wow! you actually show a good way to make games, not the "quick and dirty" way like most tutorials. I wish I had that when I was a beginner.

theDarkerSan
Автор

I'm new to Unity and I'm glad I found this now that I'm starting, made me want to switch to this new Input System which looks pretty nice, also your videos are pretty straight-forward and so easy to understand!
Thank you sir for your work, looking forward to your future videos!

shinybless
Автор

Stumbled across this last night and this is a fantastic tutorial! Great introduction to the new input system!

Pixelgraft
Автор

your tutorials always helps me in any way, thanks for uploading man

draco
Автор

It's a very bad note! who will see this comment in the future this video or this course is not made for beginners at coding it's made for beginners who is beginner to the unity engine because he is not teaching us how to write code or how did it come from and why we use it he just show the code and you copy it so I don't recommend this video for beginners because you won't remember anything or you will not be able to make any game after this course you will copy the game and paste it in your computer or laptop only ! ( It is a time destroyer only )

joegaming
Автор

Bilgilendirici güzel bir video olmuş. Emeğine sağlık. Devamını bekliyoruz.

RichGameStudio
Автор

Good joooob, waiting for the next episode

oussemajerbi
Автор

Tks from Brazil ! Saved many hours😅...

MotoKuhin
Автор

Thank you for your videos. Content is very much great. and we are looking forward for the whole series. Please kindly finish the series for us.

chinmayanand
Автор

if in the end the player not moving try this script
using UnityEngine;
using UnityEngine.InputSystem;

public class player : MonoBehaviour
{
Rigidbody2D rb;
[SerializeField] int speed;
float speedMultiplier;
bool btnPressed;
[Range(1, 10)]
[SerializeField] float acceleration;

bool isWallTouch;
public LayerMask wallLayer;
public Transform wallCheckPoint;

Vector2 relativeTransform;

private void Awake()
{
rb = GetComponent<Rigidbody2D>();
}

private void OnEnable()
{
UpdateRelativeTransform();
}

private void FixedUpdate()
{
UpdateSpeedMultiplier();
float targetSpeed = speed * speedMultiplier * relativeTransform.x;
rb.velocity = new Vector2(targetSpeed, rb.velocity.y);

isWallTouch = Physics2D.OverlapBox(wallCheckPoint.position, new Vector2(0.06f, 1.39f), 0, wallLayer);
if (isWallTouch && !btnPressed)
{
Flip();
}
}

public void Flip()
{
if (!btnPressed)
{
transform.Rotate(0, 180, 0);
UpdateRelativeTransform();

// Reset the horizontal velocity to allow the player to continue moving after flipping
rb.velocity = new Vector2(0f, rb.velocity.y);
}
}

void UpdateRelativeTransform()
{
relativeTransform =
}

public void value)
{
if (value.started)
{
btnPressed = true;
}
else if (value.canceled)
{
btnPressed = false;
}
}

void UpdateSpeedMultiplier()
{
if (btnPressed && speedMultiplier < 1)
{
speedMultiplier += Time.deltaTime * acceleration;
}
else if (!btnPressed && speedMultiplier > 0)
{
speedMultiplier -= Time.deltaTime * acceleration;
if (speedMultiplier < 0) speedMultiplier = 0;
}
}
}

IM-wsif
Автор

Why my player isnt rotating when im hitting the wall

omegaytb
Автор

4:48 I did the code right but InputSystem has a red outline under it

mitchy
Автор

Good videos, but the music is very annoying..

rragy
Автор

Your tutorial's are short and crisp, but when I am coding the player it never works. I try to see what is wrong in my code, but you type to fast. Since I have some trouble can I see the player sprite with it's code. Please and Thank you.

OmPrakash-pryp
Автор

yo can u please tell me real quick of how i can do WASD movement. everything else is perfect but i need wasd movement

DakotaMills
Автор

bro can you please give the movement script in the description or in comment i could not write the literly big script

TrillioniareLife
Автор

Nice tutorial but 5:20 i cannot find the *move* button in the movement controller, could i please be helped

shenzendachi
Автор

Sorry, can I ask you about the program to write the script? thank you in advance

handihermawan
Автор

Thanks for you tutorial, i follow your first step code but my Player not move and ai don’t ask why 😢😢😢 help me

fioreriasarmeola
Автор

I followed step by step but when i press spacebar theplayer does not move what can i do ?

Skander_GHARBI