After reading through
[this] (Dynamic gravity for characters - C++ - Unreal Engine Forums)
thread and copying and replacing the .cpp and .h files in my engine with the one’s supplied in the thread (these two:
.h]
(https://github.com/Xaklse/UnrealEngine/blob/Arbitrary_Gravity_Orientation/Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h)
and .cpp](https://github.com/Xaklse/UnrealEngine/blob/Arbitrary_Gravity_Orientation/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp) )
I get the following errors:
1>------ Build started: Project: Gravital, Configuration: Development_Editor x64 ------
1> Performing 6 actions (4 in parallel)
1> PCH.Gravital.h.cpp
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(1377): error C3668: 'UCharacterMovementComponent::ResolvePenetration' : method with override specifier 'override' did not override any base class methods
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(1619): error C3668: 'UCharacterMovementComponent::SmoothCorrection' : method with override specifier 'override' did not override any base class methods
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(1619): warning C4263: 'void UCharacterMovementComponent::SmoothCorrection(const FVector &)' : member function does not override any base class virtual member function
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(1929): warning C4264: 'void INetworkPredictionInterface::SmoothCorrection(const FVector &,const FQuat &)' : no override available for virtual member function from base 'INetworkPredictionInterface'; function is hidden
1> C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\Interfaces/NetworkPredictionInterface.h(37) : see declaration of 'INetworkPredictionInterface::SmoothCorrection'
1> C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\Interfaces/NetworkPredictionInterface.h(19) : see declaration of 'INetworkPredictionInterface'
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(1835): error C3668: 'UCharacterMovementComponent::MoveUpdatedComponent' : method with override specifier 'override' did not override any base class methods
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(124): error C2039: 'ServerMoveDualHybridRootMotion_Validate' : is not a member of 'UCharacterMovementComponent'
1> C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(122) : see declaration of 'UCharacterMovementComponent'
1>C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(124): error C2039: 'ServerMoveDualHybridRootMotion_Implementation' : is not a member of 'UCharacterMovementComponent'
1> C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/CharacterMovementComponent.h(122) : see declaration of 'UCharacterMovementComponent'
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\My Documents\Gravital\Binaries\Win64\UE4Editor-Gravital.dll
1> Total build time: 20.23 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.9\Engine\Build\BatchFiles\Build.bat" GravitalEditor Win64 Development "C:\My Documents\Gravital\Gravital.uproject" -rocket -waitmutex" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any way to fix this? I’m running 4.9.2