SHARDBREAKER - Breakdown
Problem: Procedurally spawn in Crystals randomly on the wall in your room.
Answer:
Using the MixedRealityAnchorActor I can spawn in a custom actor on the (wall, floor, table…etc.). Using a blueprint component (BPC_GameManager) located in my VRPawn. So in my BPC_GameManager, the Spawn Crystals event Proceduraly spawns Crystals on the walls in your room. A function (Get Random Wall) randomly selects a wall from the WallandLocation map variable (which stores the wall reference and its location). After the random wall is selected, a second function (Random Location Switcher) is called which randomizes the location of the crystal on that specific wall. After Spawning the crystal, the same event is bind to it for when the crystal is destroyed, to spawn a new crystal (having spawning system in the game manager to have my game code in an organized/understanble manner). The score Updater is also bind to when the crystal is destroyed, also keeping the score managed inside the game manager.
Problem: Make a shield a pattern that is highly customizable and can dissolve along the pattern.
Answer:
For the shield material, I decided to make my pattern in HLSL using the custom node, where I used for loops, if statements and trigonometric functions to get the desired pattern, allowing me to have a very high level of customization on the pattern. I also made a custom material function for the dissolve noise, since i’ll be using this in other materials (such as the sheilds outer material), making my script more organized and increasing its modularity. I am using a noise texture for the dissolve effect, then making it flow along the pattern on the shield. The pattern flows through a radial flow, filling inwards. This was done by using a radial gradient to dictate the shield material flow of filling up.
Problem: Make a UI element that sits on the palm of your hand and gives you all the information you need to play the game.
Answer:
For the Wrist UI, I showed the player’s best score, score, and time using a widget blueprint. The timer updates every second setting the correct countdown number on the widget. The radial timer is a user interface material, with a parameter to set the completion of the circle. The completion percentage is normalized as a value between 0-60.
Problem: Make a smoke visual effect for when the crystal spawns in.
Answer:
For the smoke effect, the emitter is spawning in spheres with my smoke material in a directional burst. The dust material is world aligned to give avoid having the material look repeated. The dust also has UV distortion that is panned and rotated look to give the dust a natural look for when it is dispersing. Also the spheres have a world position offset, giving the sphere suttle bumps, giving each mesh card more randomness.