Skip to content

Instantly share code, notes, and snippets.

@omerg1
omerg1 / PlayerMovement2D.cs
Created May 14, 2025 01:26 — forked from Pikachuxxxx/PlayerMovement2D.cs
A simple and quick 2D Mario like jumping player movement script in Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Rigidbody2D), typeof(BoxCollider2D))]
public class PlayerMovement2D : MonoBehaviour
{
private Rigidbody2D m_PlayerRB;
private float m_InputX;
private float m_InputY;