Local offset

Please tell me why this function is not implemented in the Tick function?

void ATank::Move(float Value)
{
FVector DeltaLocation = FVector::ZeroVector;
DeltaLocation.X = Value;
AddActorLocalOffset(DeltaLocation);

}

Because then it would always be moving. You need to create a function so that the input component can call it with the input value.

Thanks

Because we hooked up Move to Input already, Move is already being executed every frame so we don’t need to put it in Tick. Since it relates to movement, it makes the most sense to put it under Move

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms