From cc2f669b3a01060a1accffec7c51801c94b46019 Mon Sep 17 00:00:00 2001 From: Dexter Haslem Date: Tue, 28 Mar 2017 22:02:08 -0600 Subject: [PATCH] some slightly less shit defaults for the movement component --- Source/FF/Private/FFCharacterMovement.cpp | 21 +++++++++++++++++++++ Source/FF/Private/FFCharacterMovement.h | 8 ++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Source/FF/Private/FFCharacterMovement.cpp b/Source/FF/Private/FFCharacterMovement.cpp index d872d99..4a0a083 100644 --- a/Source/FF/Private/FFCharacterMovement.cpp +++ b/Source/FF/Private/FFCharacterMovement.cpp @@ -4,5 +4,26 @@ #include "FFCharacterMovement.h" +UFFCharacterMovement::UFFCharacterMovement(const class FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + // the primary purpose of this right now is to just set nicer defaults on character movements + // have no intention to re-create all the source movements like: + // trimping, down trimps + // q2 style double jumps + // rampslides and sharks + // would rather simplify and just make the movement fast and crisp to start with, + // which surprisingly the default networked movement can do OK at + MaxWalkSpeed = 1105.0f; + AirControl = 0.65f; + GroundFriction = 11.0f; + BrakingFriction = 12.0f; + JumpZVelocity = 800.0f; + + MaxAcceleration = 3500.0f; + + // verdict is out on this one + NetworkSmoothingMode = ENetworkSmoothingMode::Exponential; +} \ No newline at end of file diff --git a/Source/FF/Private/FFCharacterMovement.h b/Source/FF/Private/FFCharacterMovement.h index 1b433d9..8470054 100644 --- a/Source/FF/Private/FFCharacterMovement.h +++ b/Source/FF/Private/FFCharacterMovement.h @@ -9,11 +9,7 @@ * */ UCLASS() -class UFFCharacterMovement : public UCharacterMovementComponent +class FF_API UFFCharacterMovement : public UCharacterMovementComponent { - GENERATED_BODY() - - - - + GENERATED_UCLASS_BODY() };