top of page

Gnomeward Bound

In this project I was in charge of engine optimization and making the designed mechanics in blueprint. A lot of the work crossed over with other roles in the project. Here I will layout the blue prints for the climbing mechanics shown in the video the fall damage and the sounds the character makes when walking on different terrain.

Climbing

I tried to minimize the use of event ticks because they actively tax the processing resources of the engine. The most active sentinel calls were for modes like tracing for climbable objects, fall damage, etc. I used a sequence node to make the most use of the Event Tick Node.

Event tick calls event trackers like, tr
Event Tick Sequence

Here 2 overlap events enable or disable the code for actively tracing for climbable objects.

Collision Events
Events to enable or disable climbing col

On top I set a condition for the max distance a character can be from the ledge to be able to grab. From the Sequence node in the tracer annotation above (in event ticks picture), I continued to create the actual tracer that scans for the height of the object in the front vector of the character. For the sake of reducing encumbrance (spaghetti code) I reduced the vector calculator into a macro called ledge tracer.

Conditional requirements and Height tracer
character to ledge height requirement fo

This is the ledge tracer macro. It calculates the height for the sphere trace node.

Height and Vector Calculator Macro
ledge calculator.PNG

If the character meet the vertical and horizontal distance requirements and the object is climbable and the character is not already climbing then the character executes this animation and changes his state to hanging. A Move Component To Node is added in case the character in his animation or mesh needs to be reoriented and stop all movement.

Grab Ledge State Check , Animation Slots, character orientation + Movement Control
Gabledge mode.PNG

This is the horizontal trace to verify the distance to the object in front of the character.

Wall Tracer
Calculate vector and distance to wall.PN

This is the code that calculates the forward horizontal vector distance of the character.

distance to wall.PNG
Horizontal Distance and Vector Calculator Macro

This event code is tied to the control action to actively grab a ledge. It sets the mode to hanging and includes a macro that calculates the distance a character has to move to reach the top of the ledge when  it climbs to the top.   

Grab ledge Event
Grab ledge.PNG

This Macro calculates the distance to the top of the ledge.

Distance to Pull Up and Final Location Calculator Macro
grab ledge move to location.PNG

This event initiates the mode to ClimbingLedge when the character is moving from hanging to reaching the top of the object.

Pull Up Event and state check
climb over ledge.PNG

These events control the input when a player lets go of the ledge. It resets all modes.

Let go of Ledge
Let go of ledge.PNG

This resets the movement mode for the character while the character is climbing

Control Pull Up State
Reset Climbing mode.PNG

The jump key controls affects climbing while the character is in the hanging mode. 

Climbing Controls
Climbover tied to jump.PNG

Falldamage

I tried to minimize the use of event ticks because they actively tax the processing resources of the engine. The most active sentinel calls were for modes like tracing for climbable objects, fall damage, etc.

Fall Damage BP
FAll damage.PNG

Terrain Sound

I added a blueprint to create different stepping sounds when walking on different terrain types. Our sound engineer added the sounds and I created a physical material lists in the projects settings to apply them to.

Engine Physics Settings
soundsp.PNG

I created 3 variables referencing each of the surface types in the character blueprint. I also created 3 physical materials each referencing the appropriate sound.

Character Variables
sounds.PNG
Physics Material
sound4.PNG
Variable Defenition
sounds2.PNG

I added the physical material to the material that I wanted to produce the sound when interacting with my character.

Terrain Material
sound3.PNG

In the character walking animation I added an event every time the character's feet was about to strike the floor.

Animation Window
adding events to the animation.PNG

In the Animation blueprint I included a character reference upon initialization so that I did not have to cast every time I needed a character attribute or parameter blueprint reference.

Animation BP
Loading character blueprint reference.PN

These nodes allow the character's left foot produce appropriate sounds depending on the material the tracer interacts with.

Adding Sound to Left Foot
left step sounds.PNG

The same for the right foot.

Adding Sound to Right Foot
rignt step sound.PNG
bottom of page