{"id":15036345,"url":"https://github.com/projectborealis/pbcharactermovement","last_synced_at":"2025-04-14T06:40:21.107Z","repository":{"id":37251625,"uuid":"188458872","full_name":"ProjectBorealis/PBCharacterMovement","owner":"ProjectBorealis","description":"HL2-style, classic FPS movement for Unreal Engine implemented in C++","archived":false,"fork":false,"pushed_at":"2025-03-10T11:09:49.000Z","size":94490,"stargazers_count":1332,"open_issues_count":0,"forks_count":167,"subscribers_count":43,"default_branch":"main","last_synced_at":"2025-04-07T04:01:36.316Z","etag":null,"topics":["half-life","half-life-2","quake","source-engine","ue4","ue4-plugin","ue4-plugins","unreal","unreal-engine","unreal-engine-4","unreal-engine-plugin"],"latest_commit_sha":null,"homepage":"https://www.projectborealis.com/movement","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProjectBorealis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-24T16:59:17.000Z","updated_at":"2025-04-03T00:25:04.000Z","dependencies_parsed_at":"2023-02-02T19:02:29.561Z","dependency_job_id":"2f203017-e548-42ae-a8bb-fd2d50f03c99","html_url":"https://github.com/ProjectBorealis/PBCharacterMovement","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectBorealis%2FPBCharacterMovement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectBorealis%2FPBCharacterMovement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectBorealis%2FPBCharacterMovement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectBorealis%2FPBCharacterMovement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProjectBorealis","download_url":"https://codeload.github.com/ProjectBorealis/PBCharacterMovement/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837020,"owners_count":21169373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["half-life","half-life-2","quake","source-engine","ue4","ue4-plugin","ue4-plugins","unreal","unreal-engine","unreal-engine-4","unreal-engine-plugin"],"created_at":"2024-09-24T20:30:51.614Z","updated_at":"2025-04-14T06:40:21.047Z","avatar_url":"https://github.com/ProjectBorealis.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PBCharacterMovement\n\nProject Borealis character movement component.\n\nIncludes all your standard classic FPS movement from HL2:\n\n* Strafe bunnyhopping\n* Accelerated back hopping (and forward and back hopping)\n* Strafe boosting\n* Circle strafing\n* Surfing\n* Ramp sliding/trimping/collision boosting\n* Wall strafing\n* Smooth crouching and uncrouching\n* Crouch jumping\n* Optional pogo jumping (automatic bunnyhopping): `move.Pogo` cvar\n* Optional forward bunnyhopping: `move.Bunnyhopping` cvar\n\nMore info in this blog post: https://www.projectborealis.com/movement.\n\n## Binaries\n\nBinaries are compiled for `5.5`, and will work on C++ projects.\n\nIf you have a Blueprint project, you must upgrade to a C++ project, or else the game will fail to package.\n\nIf you are using a different version of Unreal Engine, you will need to recompile the plugin. Versions prior to `5.5` may require additional code changes. We are happy to accept PRs to improve the compatibility of the plugin.\n\n# Instructions\n\n1. [Download the PBCharacterMovement plugin](https://github.com/ProjectBorealis/PBCharacterMovement/archive/main.zip) and paste it into your project's `Plugins/` folder.\n2. Open your Unreal Engine project.\n3. Add Enhanced Input actions and mappings for forward, right, look up, turn, jump, and crouch. Setting these assets up properly is not covered here, but many tutorials for this exist online.\n4. Create a new player controller in Blueprint or C++. Here's a [simple Blueprint example](https://blueprintue.com/blueprint/mhk2sgn9/).\n5. Create a Blueprint child class of PBPlayerCharacter.\n6. Create a gamemode with Default Pawn set to your Blueprint character class, and Player Controller set to your player controller.\n7. Enjoy the movement!\n\n## Gravity\n\nYou may also want to use HL2 gravity settings. Go to Settings \u003e Project Settings \u003e Engine \u003e Physics \u003e Constants \u003e Default Gravity Z and set it to `-1143`.\n\nThe player movement will automatically adjust its own gravity scale to account for any differences between the gravity Z in your project and HL2, so\nit's fine if you want a different gravity for your physics objects, and retain HL2 player gravity for fall speeds and jump heights. However, if you want\nto fully use your own gravity instead of HL2 gravity, you can define `USE_HL2_GRAVITY=0`\n\n## Physics materials\n\nAdditionally, your default physics material should have a friction of `0.8` and restitution of `0.25` if you want Source defaults.\n\nYou can put this in your `Config/DefaultEngine.ini` file to do so:\n\n```ini\n[SystemSettings]\np.DefaultCollisionFriction=0.8\np.DefaultCollisionRestitution=0.25\n```\n\n## Move Speeds and Ladder\n\nOur ladder movement code and sprinting speed logic is game specific and is not publicly redistributed at this time. However, we do have stubs for you to insert your own logic here.\n\nYou can call `SetSprinting` and `SetWantsToWalk` for sprint and walk speed respectively. You can set `SprintSpeed`, `WalkSpeed` to set speeds for those modes, and set `RunSpeed` for the default speed.\n\nLadder movement code is a bit less complete due to reliance on ladder entity data to determine various aspects of the movement like direction and state. Integrating your own ladder code is outside\nthe scope of this document, and is left as an exercise for the reader.\n\n## Jump Boosting\n\n\"Jump boosting\", a feature of HL2 that causes the player to get a velocity boost when jumping. This also\ncauses the accelerated back hopping (ABH) bug which allows players to rapidly move around the map. You can control this feature using the `move.JumpBoost` cvar. `0` will entirely remove this feature, resulting in no velocity boost. `1` is HL2 functionality, with the ABH bug. `2` is HL2 functionality, patched to prevent such exploits. You may want to use `0` or `2` for a multiplayer game.\n\n## Forward bunnyhopping \n\nAn older version of HL2 had a bug where the jump boosting feature had no speed limit, and players could repeatedly jump to get successively speed boosts with no special movement like ABH requires. You can enable\nthe feature from the older engine of HL2 by setting `move.Bunnyhopping 1`.\n\n## First person mesh support\n\nUnreal Engine's character movement component assumes the character's mesh is a third person mesh that is grounded within the world. This affects how it is positioned when crouch hitboxes change, and some other effects.\n\nTherefore, to assist in implementing first-person games and reduce confusion, we have provided a Mesh1P component you can use for FPS meshes for the player's perspective. You will need to implement your own\ngame-specific positioning system though, and respond to crouch eye height changes. We recommend to do this on camera update. If you need an example, please refer to the old `ShooterGame` example project from Epic. If you do not want or need this functionality, define `USE_FIRST_PERSON=0`.\n\n## Always apply friction\n\nHL2 movement uses friction to bring the player down to the speed cap. In air, this is not\napplied by default. If you would like to limit the player's air speed, set `move.AlwaysApplyFriction 1`.\n\n## Crouch sliding\n\nExperimental support for crouch sliding is provided by setting `bShouldCrouchSlide` to `true`. However, some gameplay effects, like camera shakes, sounds, etc have been stripped due to dependencies on some internal gameplay systems. You can implement this for your own game if wanted.\n\n## Directional braking\n\nHL2 movement only applies braking friction in oppposition to the player's full movement. This may be too slippery when strafing or tapping keys for some games, these games can use directional braking which brakes each direction (forward/back and left/right) independently, allowing for each directional to be opposed by friction with full force. Enable this by defining `DIRECTIONAL_BRAKING=1`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectborealis%2Fpbcharactermovement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectborealis%2Fpbcharactermovement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectborealis%2Fpbcharactermovement/lists"}