Pong in C++ – Independent Camera and Material for Score

I am continuing the development of a Pong game in C++. This time, I will setup an independent camera and set the material for the Score.

Independent Camera

I am adding a camera to the level. I am rotating it to face the game:

AddCamera

A good location for the camera seems to be (0, 0, 3000) with a rotation of (0, -90, 0).

I am opening the Level Blueprint and set the Camera for the Player Controller:

LevelBlueprint

Material for Text

It seems that I can’t see the Score text. I need a new material. I am going into the Unreal Engine Content. To view the Engine Content, go to the View Options and select Show Engine Content:

ShowEngineContent

In the EngineMaterials folder, I am duplicating the DefaultTextMaterialOpaque. I am renaming it M_PongText and I am moving it in my Materials folder.

I am editing my new material and set the Shading Model to Unlit and plug the Vertex Color to Emissive.

When I hit play, I can see the text:

PongPlay

Next Step

Next step, I will create a Paddle Pawn.

About

Gamer

Tagged with:

Leave a Reply