Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdsherbert/unreal-engine-networked-sprint-component
Replicated Sprinting Component for Unreal Engine game projects. Utilizes Enhanced Input System plugin for input action definitions/bindings.
https://github.com/jdsherbert/unreal-engine-networked-sprint-component
component cpp cpp11 cpp17 cpp20 enhancedinput multiplayer networked replicated unreal unreal-engine unreal-engine-5 unrealengine
Last synced: 4 months ago
JSON representation
Replicated Sprinting Component for Unreal Engine game projects. Utilizes Enhanced Input System plugin for input action definitions/bindings.
- Host: GitHub
- URL: https://github.com/jdsherbert/unreal-engine-networked-sprint-component
- Owner: JDSherbert
- License: mit
- Created: 2024-01-01T22:44:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-05T19:57:29.000Z (about 1 year ago)
- Last Synced: 2024-10-12T16:02:16.316Z (4 months ago)
- Topics: component, cpp, cpp11, cpp17, cpp20, enhancedinput, multiplayer, networked, replicated, unreal, unreal-engine, unreal-engine-5, unrealengine
- Language: C++
- Homepage:
- Size: 31.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![image](https://github.com/JDSherbert/Unreal-Engine-Networked-Sprint-Component/assets/43964243/861c2355-34f5-4261-a6b0-deffb480d7d8)
# Unreal Engine Networked Sprint Component
-----------------------------------------------------------------------
-----------------------------------------------------------------------
## OverviewThis is a replicated sprint component that leverages the enhanced input system for bindings and input action definitions. The sprint component is designed to be easily integrated into your Unreal Engine projects, providing a replicated sprint functionality that synchronizes across the network.
To use this SprintComponent, attach it to an ACharacter.
It works by binding the defined Enhanced Input Action to a function, which modifies the walkspeed value contained within the CharacterMovementComponent (which normally exists by default on ACharacter class objects.) We make sure this occurs across a network by using an RPC (Remote Procedural Call), and the `GetLifetimeReplicatedProps(TArray& OutLifetimeProps)` function.Feel free to tweak the values in the script, I've made them easy to find in the .cpp file, inside a namespace!
The code is commented well and transient/autopopulated variables are marked as such.-----------------------------------------------------------------------