We are going to implement moving platforms using the game loop and how tick function is related to it. If you have used Unity the update function is the tick function.
- Process Input
- Update game state
- Render to Display
- Frame — single picture in a video
- Frame Rate- how many frames per second (FPS)
- Tick-Called every frame
For this we are going to remove SetActorLocation from our BeginPlay and put it under our Tick function. Now everyframe we will be putting the actor in the same place every time, but if we tell it to move a direction every frame it will move in that direction.
We now have a moving platform!