Week 29-30:
HND Project
So,
for the past month I’ve been working on another game. I wanted to keep that
game and this UE4 Project separate, but I my incorporate bits from both games
into on another. For now, I shall be creating a Minimap for the UE4 Project
this week and next week. To start off with, I went into the “FirstPersonCharacter”
and into its “Viewport”, there I created a “SpringArm” and set its Rotation Y Axis
to -90. After that, I then created a “SceneCaptureComponent2D” and named it “MinimapCapture”.
In
the “Contents Browser”, in the “Materials and Textures” I then created a new “RenderTarget”
and named that “MinimapRenderTarget”. I then went back to the “FirstPersonCharacter”
blueprint and went to the “MinimapCapture” where I applied the “MinimapRenderTarget”
to its “TextureTarget”. This means it’ll capture its data and render it now as
a result.
I
then right-clicked on “MinimapRenderTarget” in the “ContentsBrowser” and
pressed “Create Material”, thus creating a “MinmapRenderTarget_Mat” which I
then clicked and opened it up. I then changed its “Surface” to “User Interface”
and then hooked up the “TextureSample” to “Final Color”. I then clicked “Apply”
and “Save” before going back to the “Content Browser”.
I
then went and created a new “Widget Blueprint” from the “User Interface”, that
I then opened and dragged a “Image” across to the screen. I then changed its size
to “250”x”250”. In the “Brush” section, I then chose the “MinimapRenderTarget_Mat”
and clicked “Compiled”. To get it onto the screen in-game, I then had to click
on “Open Level Blueprints” and enter its “Graph”.
I
then entered the “Level created the following piece of coding. After this, I
received the following results. I then decided to tidy this up due to getting
lag from the pitch. To do this, I went back into the “FirstPersonCharacter”
viewport and on “SpringArm”, I unclicked all of the “CameraSettings”.
I
then clicked onto the “MinimapCapture” and scrolled down to “Perception” and
changed it from “Perceptive” to “Orthographic”. I then changed its width from “512”
to “1000”. Now when I play the game, it no longer has the lagging issue. Other
changes I made, I went into the “SceneCapture” and went into the advanced “General
Show Flags”, then ticked off the “Skeletal Meshes”.
After
this, I then decided to create an icon to represent my character on the Map. To
do this, I found a “Pointer” icon on the internet and then uploaded it onto my
UE4 Project. I then turned into a “Sprite”
using the “Create Sprite” option. Then in the viewport, I added “PaperSprite”
to the “SpringArm”.















