Auto Move
Unreal
void APlayerChar::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
FVector movLoctn = GetActorLocation();
movLoctn.X += 8;//(+=) because FVector::X already declare, You Only Add Speed which is '8'
SetActorLocation(movLoctn);
}
Unity
private void Update() => transform.Translate(Vector3.forward * 8 * Time.deltaTime);
Comments
Post a Comment