Skip to content

rahemk/PlayerMovement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Player Movement Script

This is a simple and versatile script designed to handle player movement in your Unity game projects.

Features

  • Smooth and responsive player movement.
  • Support for both keyboard and joystick input.
  • Customizable movement speed and acceleration.
  • Jumping functionality with adjustable jump height.
  • Ground detection to prevent mid-air jumps.
  • Adjustable gravity for realistic vertical movement.
  • Collision detection to handle collisions with other game objects.
  • Easy integration with existing projects.

Getting Started

Prerequisites

  • Unity 3D (version 20XX.XX or higher)

Installation

  1. Clone this repository or download the ZIP file and extract it.
  2. Open your Unity project.
  3. Navigate to the desired location in your project's folder structure where you want to add the Player Movement Script.
  4. Copy the PlayerMovement.cs script from the downloaded repository into your project's folder.
  5. In the Unity editor, select the game object representing your player character.
  6. Add the PlayerMovement script component to the player object by clicking on "Add Component" and searching for "PlayerMovement".

Usage

  1. Attach the PlayerMovement script to your player character object.
  2. Adjust the movement speed, acceleration, jump height, and gravity parameters as per your game's requirements.
  3. Ensure that your player character has a collider component attached to it to handle collision detection.
  4. Map the desired input keys or joystick axes to the corresponding input fields in the PlayerMovement script.
  5. Run your game and enjoy the smooth player movement!

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

About

A player movement script for a 2D game object in unity. Consists of running, jumping and dash functionality. Plan on adding more in the future

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages