Skip to content

Instantly share code, notes, and snippets.

@MadCoderr
MadCoderr / gist:b0282e030eb7fb7a18fc14fdd6a12cdb
Last active April 1, 2022 09:04
Unity3d Pacman like movement
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour {
[SerializeField] private float MoveSpeed = 5f;
[SerializeField] private float GridSize = 1f;
[SerializeField] private float CheckDistance = 0.005f;
[SerializeField] private LayerMask BlockLayer;