Announcement

Collapse
No announcement yet.

Dynamic gravity for characters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Xaklse, why you shared your project via mediafire.com, with NinjaCharacterBeta4.zip file, but not with another one git repository at GitHub?

    Comment


      I created a new C++ FPS project in Unreal Engine v. 4.12.5, and called it "Xs" for the sake of simplicity.
      I Created the C++ classes in the Engine, and then(since the project was called "Xs") I simply copied the code from the *.h and *.cpp files included in the NinjaCharacterBeta4.zip to the newly created *.h and *.cpp files in Visual Studio.
      I added the extra dependency line in the Xs.Build file, and tried to compile with Visual Studio Community 2015, but I got this:
      Code:
      C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(988): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(988): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2065: 'UBrushComponent': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2065: 'VolumeBrushComp': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2227: left of '->GetBrushComponent' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1000): error C2065: 'VolumeBrushComp': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): error C2065: 'VolumeBrushComp': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): error C2227: left of '->LineTraceComponent' must point to class/struct/union/generic type
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2227: left of '->FluidFriction' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2789: 'Friction': an object of const-qualified type must be initialized
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): note: see declaration of 'Friction'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2227: left of '->FluidFriction' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2789: 'Friction': an object of const-qualified type must be initialized
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): note: see declaration of 'Friction'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1299): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1299): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1305): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1305): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1328): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1328): error C2227: left of '->TerminalVelocity' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(2372): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(2372): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2065: 'FDisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2027: use of undefined type 'UCanvas'
      2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\AIModule\Classes\Navigation/PathFollowingComponent.h(13): note: see declaration of 'UCanvas'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2227: left of '->DisplayDebugManager' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): error C2228: left of '.SetDrawColor' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3238): error C2027: use of undefined type 'APhysicsVolume'
      2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3238): error C2227: left of '->GetName' must point to class/struct/union/generic type
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): error C2065: 'DisplayDebugManager': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): error C2228: left of '.DrawString' must have class/struct/union
      2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): note: type is 'unknown-type'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3260): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3268): error C3861: 'DrawDebugDirectionalArrow': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3272): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3283): error C3861: 'DrawDebugDirectionalArrow': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3288): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3297): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3310): error C3861: 'DrawDebugDirectionalArrow': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3315): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3325): error C3861: 'DrawDebugString': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3400): error C3861: 'DrawDebugCapsule': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3401): error C3861: 'DrawDebugCapsule': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3499): error C3861: 'DrawDebugCapsule': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3500): error C3861: 'DrawDebugCapsule': identifier not found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2065: 'UDestructibleComponent': undeclared identifier
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2672: 'Cast': no matching overloaded function found
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2974: 'Cast': invalid template argument for 'T', type expected
      2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\CoreUObject\Public\UObject\Linker.h(2298): note: see declaration of 'Cast'
      2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2974: 'Cast': invalid template argument for 'To', type expected
      2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\CoreUObject\Public\Templates\Casts.h(87): note: see declaration of 'Cast'
      2>ERROR : UBT error : Failed to produce item: C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Binaries\Win64\UE4Editor-Xs.dll
      2>  Total build time: 23.76 seconds
      2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""C:\Program Files\Epic Games\4.12\Engine\Build\BatchFiles\Build.bat" XsEditor Win64 Development "C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Xs.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.

      Comment


        dreyn your errors are caused by missing includes I think. For example
        Code:
        #include "GameFramework/PhysicsVolume.h"
        will solve "error C2027: use of undefined type 'APhysicsVolume'".



        On to my own problem:

        I got it to compile on 4.12.0 (constraint of the project I am working on) except for one function I had to comment out:

        Code:
        protected:
        	/** Called when the collision capsule touches another primitive component */
        	virtual void CapsuleTouched(UPrimitiveComponent* OverlappedComp, AActor* Other, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) override;
        Otherwise I get:

        Code:
        warning C4264: 'void UCharacterMovementComponent::CapsuleTouched(AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &)': no override available for virtual member function from base 'UCharacterMovementComponent'; function is hidden
        Is there something I can do to get this to work with the protected function?

        Comment


          Originally posted by Arthur Khusnutdinov View Post
          Xaklse, why you shared your project via mediafire.com, with NinjaCharacterBeta4.zip file, but not with another one git repository at GitHub?
          Yeah yeah, I didn't want to waste time with git.

          Originally posted by dreyn74 View Post
          I created a new C++ FPS project in Unreal Engine v. 4.12.5, and called it "Xs" for the sake of simplicity.
          I Created the C++ classes in the Engine, and then(since the project was called "Xs") I simply copied the code from the *.h and *.cpp files included in the NinjaCharacterBeta4.zip to the newly created *.h and *.cpp files in Visual Studio.
          I added the extra dependency line in the Xs.Build file, and tried to compile with Visual Studio Community 2015, but I got this:
          Code:
          C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(988): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(988): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2065: 'UBrushComponent': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2065: 'VolumeBrushComp': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(998): error C2227: left of '->GetBrushComponent' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1000): error C2065: 'VolumeBrushComp': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): error C2065: 'VolumeBrushComp': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): error C2227: left of '->LineTraceComponent' must point to class/struct/union/generic type
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1007): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2227: left of '->FluidFriction' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): error C2789: 'Friction': an object of const-qualified type must be initialized
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1083): note: see declaration of 'Friction'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2227: left of '->FluidFriction' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): error C2789: 'Friction': an object of const-qualified type must be initialized
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1227): note: see declaration of 'Friction'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1299): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1299): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1305): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1305): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1328): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(1328): error C2227: left of '->TerminalVelocity' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(2372): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(2372): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2065: 'FDisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2027: use of undefined type 'UCanvas'
          2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\AIModule\Classes\Navigation/PathFollowingComponent.h(13): note: see declaration of 'UCanvas'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3216): error C2227: left of '->DisplayDebugManager' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): error C2228: left of '.SetDrawColor' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3217): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3219): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3222): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3225): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3228): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3231): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3238): error C2027: use of undefined type 'APhysicsVolume'
          2>  C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\MovementComponent.generated.h(15): note: see declaration of 'APhysicsVolume'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3238): error C2227: left of '->GetName' must point to class/struct/union/generic type
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): error C2065: 'DisplayDebugManager': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): error C2228: left of '.DrawString' must have class/struct/union
          2>  C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3240): note: type is 'unknown-type'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3260): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3268): error C3861: 'DrawDebugDirectionalArrow': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3272): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3283): error C3861: 'DrawDebugDirectionalArrow': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3288): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3297): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3310): error C3861: 'DrawDebugDirectionalArrow': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3315): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3325): error C3861: 'DrawDebugString': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3400): error C3861: 'DrawDebugCapsule': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3401): error C3861: 'DrawDebugCapsule': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3499): error C3861: 'DrawDebugCapsule': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3500): error C3861: 'DrawDebugCapsule': identifier not found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2065: 'UDestructibleComponent': undeclared identifier
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2672: 'Cast': no matching overloaded function found
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2974: 'Cast': invalid template argument for 'T', type expected
          2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\CoreUObject\Public\UObject\Linker.h(2298): note: see declaration of 'Cast'
          2>C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Source\Xs\NinjaCharacterMovementComponent.cpp(3653): error C2974: 'Cast': invalid template argument for 'To', type expected
          2>  C:\Program Files\Epic Games\4.12\Engine\Source\Runtime\CoreUObject\Public\Templates\Casts.h(87): note: see declaration of 'Cast'
          2>ERROR : UBT error : Failed to produce item: C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Binaries\Win64\UE4Editor-Xs.dll
          2>  Total build time: 23.76 seconds
          2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""C:\Program Files\Epic Games\4.12\Engine\Build\BatchFiles\Build.bat" XsEditor Win64 Development "C:\Users\...\OneDrive\Documents\Unreal Projects\Xs\Xs.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
          Maybe I deleted too much in the headers when updating code, the Unity builds may be the culprit. Sorry for that, let me know if you find the fix.

          Originally posted by Crafty View Post
          I got it to compile on 4.12.0 (constraint of the project I am working on) except for one function I had to comment out:

          Code:
          protected:
          	/** Called when the collision capsule touches another primitive component */
          	virtual void CapsuleTouched(UPrimitiveComponent* OverlappedComp, AActor* Other, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) override;
          Otherwise I get:

          Code:
          warning C4264: 'void UCharacterMovementComponent::CapsuleTouched(AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &)': no override available for virtual member function from base 'UCharacterMovementComponent'; function is hidden
          Is there something I can do to get this to work with the protected function?
          UCharacterMovementComponent::CapsuleTouched? Wrong namespace?
          Ninja Character Code Plugin
          Visual Studio snippets for UE4
          ---------- ---------- ---------- ----------
          SonicGDK / Ashura: Dark Reign
          Heaven of Relics / Relic Madness

          Comment


            Namespace was correct. Discovered the problem though - different function arguments with this engine version.
            Code:
            (AActor* Other, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
            Code:
            (UPrimitiveComponent* OverlappedComp, AActor* Other, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)

            Comment


              [MENTION=4059]Xaklse[/MENTION].. Thanks for making the class available. Looks cool! A couple of questions thou.. the custom gravity direction I can't seem to get to work.. I have a 'planet blueprint' where I'm casting to the movement component in order to set the direction as follows:



              Also in normal operation (floor matching etc.. ) the character gets all crazy.. I think its something to do with rotating the character to the camera in it's blueprint.. but I havent dug much yet..



              Maybe you have an idea?

              Thanks again.

              Comment


                Was a bit worried that dynamic gravity won't work with my custom root motion controller, but it looks like everything runs great. Thanks!

                Comment


                  Originally posted by dreyn74 View Post
                  I created a new C++ FPS project in Unreal Engine v. 4.12.5, and called it "Xs" for the sake of simplicity.
                  I Created the C++ classes in the Engine, and then(since the project was called "Xs") I simply copied the code from the *.h and *.cpp files included in the NinjaCharacterBeta4.zip to the newly created *.h and *.cpp files in Visual Studio.
                  I added the extra dependency line in the Xs.Build file, and tried to compile with Visual Studio Community 2015, but I got this:
                  [...]
                  Try this collection of includes in the NinjaCharacterMovementComponent.cpp file:
                  Code:
                  #include "Xs.h"
                  #include "NinjaCharacterMovementComponent.h"
                  
                  
                  #include "GameFramework/PhysicsVolume.h"
                  #include "GameFramework/GameNetworkManager.h"
                  #include "Navigation/PathFollowingComponent.h" // @todo Epic: this is here only due to circular dependency to AIModule.
                  #include "Components/DestructibleComponent.h"
                  #include "Engine/Canvas.h"
                  #include "PerfCountersHelpers.h"
                  ================================================================================

                  Originally posted by jamietelford View Post
                  [MENTION=4059]Xaklse[/MENTION].. Thanks for making the class available. Looks cool! A couple of questions thou.. the custom gravity direction I can't seem to get to work...
                  Well, I hope my blueprint is helpful, make sure you read each popup on each var.



                  ================================================================================

                  Originally posted by Peter Shoferistov View Post
                  Was a bit worried that dynamic gravity won't work with my custom root motion controller, but it looks like everything runs great. Thanks!
                  You're welcome.
                  Ninja Character Code Plugin
                  Visual Studio snippets for UE4
                  ---------- ---------- ---------- ----------
                  SonicGDK / Ashura: Dark Reign
                  Heaven of Relics / Relic Madness

                  Comment


                    I linked my UE4 account with Github, I still get the 404. The post seems to be a little old, what happened to this component? where can I get it ?

                    Comment


                      You have not linked your account properly. The page does not 404 for me.

                      Comment


                        Hi, I don't know why I don't have the ninja character movement Click image for larger version

Name:	captura 1.png
Views:	1
Size:	264.3 KB
ID:	1114799 Click image for larger version

Name:	captura2.png
Views:	1
Size:	519.5 KB
ID:	1114800
                        As you can see I have the ninja character c++ class working and I have the character movement but without the ninja part. How can I fix this?
                        PS: UE4 12.5

                        Comment


                          I took a look at your github and adapted some of your code to work as a child class of the character movement component instead of directly modifying it. My Z axis motion is still being killed somewhere though and I can't figure out where. I overwrote any functions with ".Z" in them. Got any ideas of which functions to look at?

                          Edit: Input acceleration was being constrained in the tick
                          Last edited by BlackFangTech; 09-13-2016, 03:30 PM.

                          Check out my discord -> https://discord.gg/kQdVwJ3

                          Follow us on twitter to get updates on new products and special offers -> https://twitter.com/BlackFangTech

                          Black Fang Technologies' products -> https://www.unrealengine.com/marketp...20Technologies

                          Comment


                            Originally posted by MinZe25 View Post
                            Hi, I don't know why I don't have the ninja character movement
                            [pictures]
                            As you can see I have the ninja character c++ class working and I have the character movement but without the ninja part. How can I fix this?
                            PS: UE4 12.5
                            No idea, the NinjaCharacter must be using the NinjaCharacterMovementComponent, I just placed a NinjaCharacter in a simple level and everything is fine (UE4 12).

                            Originally posted by BlackRang666 View Post
                            I took a look at your github and adapted some of your code to work as a child class of the character movement component instead of directly modifying it. My Z axis motion is still being killed somewhere though and I can't figure out where. I overwrote any functions with ".Z" in them. Got any ideas of which functions to look at? Edit: Input acceleration was being constrained in the tick
                            My code is currently a child class for any game project, you don't have to recompile the engine.
                            Ninja Character Code Plugin
                            Visual Studio snippets for UE4
                            ---------- ---------- ---------- ----------
                            SonicGDK / Ashura: Dark Reign
                            Heaven of Relics / Relic Madness

                            Comment


                              Very Cool!

                              Comment


                                Hope can be integrated into the engine

                                Comment

                                Working...
                                X