I am continuing the development of a simple Pong game using Unreal Engine in C++.
ScoreComponent
I’ve created a new ActorComponent named ScoreComponent. This component is added to a TextRenderer in order to set the current score for the associated player. This component reacts to a GameState OnScoreChanged event.
GameMode is now also reacting to OnScoreChanged to reset the ball.
PaddleAI
I’ve finally created the Paddle AI to be able to play. It is a simple class based on APaddle. This PaddleAI moves each Tick based on the position of the Ball. It moves its X position toward the X position of the Ball.
Next
Next I will create a Start Menu.
Leave a Reply