All Projects → dyrdadev → first-person-controller-for-unity

dyrdadev / first-person-controller-for-unity

Licence: MIT license
A First-Person Controller for Unity.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to first-person-controller-for-unity

ScriptableObjectDropdown
Dropdown for ScriptableObjects
Stars: ✭ 40 (+122.22%)
Mutual labels:  indiedev, madewithunity
Bytepath
A replayable arcade shooter with a focus on build theorycrafting made using Lua and LÖVE.
Stars: ✭ 1,119 (+6116.67%)
Mutual labels:  gamedev, indiedev
Bake
A build system that lets you clone, build and run C/C++ projects with a single command
Stars: ✭ 434 (+2311.11%)
Mutual labels:  gamedev, indiedev
Wizardwarz
WebGL Multiplayer game with NodeJS backend
Stars: ✭ 270 (+1400%)
Mutual labels:  gamedev, indiedev
Parrothunt
ParrotHunt - ThreeJS WebGL game (http://parrothunt.nergal.se)
Stars: ✭ 85 (+372.22%)
Mutual labels:  gamedev, indiedev
Awesome One Person Games
🎮 A curated list of successul games, made (quite) entirely by a lone gamedev.
Stars: ✭ 276 (+1433.33%)
Mutual labels:  gamedev, indiedev
Voxelengine unity
Voxel engine made in C# for Unity
Stars: ✭ 25 (+38.89%)
Mutual labels:  gamedev, indiedev
anise-cheezball-rising
an exciting new adventure for the Game Boy Color
Stars: ✭ 72 (+300%)
Mutual labels:  indiedev, indiegame
Raylib Games
Collection of games made with raylib
Stars: ✭ 78 (+333.33%)
Mutual labels:  gamedev, indiedev
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+64888.89%)
Mutual labels:  gamedev, indiedev
Dino3d
🦖 Google Chrome T-Rex Run! in 3D (WebGL experiment)
Stars: ✭ 263 (+1361.11%)
Mutual labels:  gamedev, indiedev
Qake
Qake voxel-engine demo
Stars: ✭ 100 (+455.56%)
Mutual labels:  gamedev, indiedev
antkeeper-source
💿🐜 Antkeeper source code (GitHub mirror)
Stars: ✭ 23 (+27.78%)
Mutual labels:  gamedev, indiegame
Blog
gamedev blog
Stars: ✭ 3,076 (+16988.89%)
Mutual labels:  gamedev, indiedev
ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (+0%)
Mutual labels:  gamedev, indiedev
Lambdahack
Haskell game engine library for roguelike dungeon crawlers; please offer feedback, e.g., after trying out the sample game with the web frontend at
Stars: ✭ 439 (+2338.89%)
Mutual labels:  gamedev, indiedev
CuboidalDrift
A casual, fun, 3D indie game made with Unity
Stars: ✭ 13 (-27.78%)
Mutual labels:  indiedev, indiegame
Dungeongenerator
Dungeon generator for games.
Stars: ✭ 66 (+266.67%)
Mutual labels:  gamedev, indiedev
Badsanta
BadSanta - Multiplayer HTML5 Game (http://santa.qake.se)
Stars: ✭ 97 (+438.89%)
Mutual labels:  gamedev, indiedev
Voxlords
VoxLords - ThreeJS WebGL game with a simple voxel engine
Stars: ✭ 154 (+755.56%)
Mutual labels:  gamedev, indiedev






First-Person Controller
for Unity






First-Person Controller for Unity

A First-Person Controller for Unity.

🧪 EXPERIMENTAL This project is experimental. It is still under development, so it may be unstable. It is not optimized and is largely untested. Do not use this project in critical projects.

This package includes a First-Person Controller for Unity. Check out the Features section for a detailed list of all features of the controller. The footage below shows the open-source sample project "Mapper's Peak" using the First-Person Controller.



Gameplay footage from the 'Mapper's Peak' sample project using the First-Person Controller

Quick Start

  1. Install the First Person Controller: Install this package as described below.
  2. Install UniRx: The package depends on UniRx. Unfortunately, this dependency cannot be included automatically; the reason is described below in the "Special Dependencies" section. You have to include UniRx in your project. UniRx is available as UPM package or you can import it from the Asset Store.
  3. Update to Unity's new Input System This package uses Unity's Input System package. When asked from Unity, update to Unity's new Input System. Alternatively, you can implement your own FirstPersonControllerInput class and ignore the existing PlayerInput folder.
  4. Explore your scene: Add the "FirstPersonPlayer" prefab from the package to your scene. Now you can explore your scene with the First-Person Controller.

Install the Package

I recommend installing this package from a Git URL using the Package Manager window. This involves the following steps:

  1. Open the Package Manager window in your Unity editor (Window ➜ Package Manager)
  2. Click "+" in the upper left corner ➜ "Add package from git URL"
  3. Enter the Git URL of the latest release: https://github.com/dyrdadev/first-person-controller-for-unity.git#0.0.3 and click "Add"

You can find more information here.

Special Dependencies

UniRx

The controller depends on UniRx. UniRx is the implementation of ReactiveX for Unity. Unfortunately, it is not possible to add it as a dependency because Unity doesn’t support Git URLs for indirect dependencies. UniRx has to be installed manually in your project that uses the First Person Controller. UniRx is available as UPM package or you can import it from the Asset Store.

If you want to learn UniRx to extend the controller or use it for other components, I recommend the tutorial series "ReactiveX and Unity3D" by Tyler Coles. Also check out the official material of UniRx and ReactiveX.

Input System Package

The project includes player input and uses Unity's new Input System Package. The new system replaces the classic input system with the Input Manager in UnityEngine.Input. On import, Unity asks you if your project should be updated to the new Input System. If you need the UnityEngine.Input input system, you can set the "Active Input Handling" option in the Player settings (Project Settings ➜ Player ➜ Other Settings) to Both. Then you can use the new Input System Package System and the old Input Manager with the UnityEngine.Input class.

If you do not want to switch to the new input system, you can implement your own FirstPersonControllerInput class that uses the input system of your choice.

Features

Support of Various Input Devices

The First-Person Controller supports a mouse + keyboard input scheme and a gamepad input scheme. You can edit the input schemes and add new ones in the "FirstPersonInputAction" Input Action Asset. Check out the manual of the Input System for further information.

Full Locomotion

The First-Person Controller implements physics-based locomotion allowing you to move around, run, and jump.

Character Effects

The controller implements an ICharacterSignals interface for character effects such as character audio or camera effects. The interface offers you an easy way to implement your own effects. The package currently includes the following effects, which are already implemented:

  • Head Bob The package includes an optional head-bob effect for walking and running. The effect moves the camera slightly up and down to simulate the movement.
  • Sound Effects The package includes an optional component for sound effects of the character.

License

This package is licensed under an MIT license. See the LICENSE file for details.

Special Thanks

This project was inspired by the tutorial series "ReactiveX and Unity3D" by Tyler Coles. Many approaches of this tutorial series inspired features of this project. And the tutorial is what introduced me to Reactive Programming in Unity in the first place. I recommend checking out the tutorial series.

Support & Contribute

This project was created by Daniel Dyrda.

Daniel: If you want to support me and my projects, you can follow me on GitHub (dyrdadev) and Twitter (@daniel_dyrda). Just come by and say hello, I would love to hear how you are using the project.

If you want to contribute to this project, you are welcome to do so. Just write to me and we will find a way to collaborate.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].