Starting with UE4 and following this tutorial:
https://docs.unrealengine.com/latest/INT/Programming/Tutorials/PlayerCamera/3/
ATraveller::ATraveller()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
//InputComponent->BindAction("Forward", IE_Pressed, this, &ATraveller::WalkForward);
}
// Called when the game starts or when spawned
void ATraveller::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ATraveller::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
//FVector NewLocation = GetActorLocation();
////float DeltaHeight = (FMath::Sin(RunningTime + DeltaTime) - FMath::Sin(RunningTime));
////NewLocation.Z += DeltaHeight * 20.0f; //Scale our height by a factor of 20
////RunningTime += DeltaTime;
////SetActorLocation(NewLocation);
//WalkForward();
//NewLocation += _movementDelta * DeltaTime * 60.0f;
//SetActorLocation(NewLocation);
}
void ATraveller::WalkForward()
{
//float value = 0.01f;
//_movementDelta.X += value;
}
With the code commented in, the editor crashes every time I try to open it. I would suspect it is probably something I am doing wrong with BindAction, or maybe that code is outdated and that web page needs to be altered.
Windows 10 Home
i5-4670K
8GB
64-bit