I tried to add code to Moveforward function of basic Character in Third person project:
if (GetPawnPhysicsVolume()->bWaterVolume)
{
const FRotator Rotation = Controller->GetControlRotation();
const FVector Direction = FRotationMatrix(Rotation).GetUnitAxis(EAxis::X);
AddMovementInput(Direction, Value);
return;
}
But I get error about Physics Volume type being undefined:
1>D:\Tim\UE4\Projects\Test3Person\Source\Test3Person\Private\Test3PersonCharacter.cpp(95): error C2027: use of undefined type 'APhysicsVolume'
1> D:\Tim\UE4\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(70) : see declaration of 'APhysicsVolume'
1>D:\Tim\UE4\Projects\Test3Person\Source\Test3Person\Private\Test3PersonCharacter.cpp(95): error C2227: left of '->bWaterVolume' must point to class/struct/union/generic type
How to resolve this problem?