Breakfast Bay

Dev Journal for Breakfast Bay

Temporary Solution for Blender port UE scaling problem

  • When porting out from blender, use this file: new_sub_export.blend

  • while keeping this scale, when porting into UE, have the following settings: (mainly just keep the scale to 100 times of original)

Support links that may or may not helped:

Quick Guide on UE Git

You can use this repo I made to test it out:
https://github.com/yunchengzhang1/BreakfastBayDemo


Where to enable UE Source Control?

Bottom right corner for UE5
Also need to enable the Git plugin

Submit Files

Note: always need to add a changelist description
once "submit" is clicked, this change will be automatically pushed, need to commit through github (I'm using the github desktop GUI like the goober I am)

Result below:

Sidenote for Readability of This Journal:

========================================================

Note: All functions will be Bold, and all parameters and return values for that function will be Underlined, Actors will be Italic

========================================================

Section: Making a Hit Count

This is the section where we implement (and update) the harpoon mechanic, and add in a test dummy

Setting Up Harpoon Shooting

The current goal is to implement a hit-scan harpoon weapon for the submarine that will pull targets towards the player.

RightClick keybind

Setting the RightClick keybind to Right Mouse Button

Harpoon Root

To map the exact location that we want the harpoon to be launched from the player model, I added a mesh called HarpoonRoot, parented to the player capsule, so it can be called later on.

Above is the first part of the harpoon control function.

  • It starts off with InputAction of RightClick, which is triggered by holding down Right Mouse Button.

  • When the key is pressed, action triggers, it calls the SphereTraceByChannel function, this function takes Start and End to create a trail/trace in between and that is to simulate the trajectory of your shot.

  • The Start is defined by World Location of our hook root(that sphere mentioned before)

  • The End is defined by where the player's camera is facing/aiming (that vector that defines direction), multiplied with a pre-defined HookLength.


Making the Player Faced Towards the Camera Direction

Uncheck Orient Rotation to Movement and enable Use Controller Desired Rotation

Sphere Trace Result

a demonstration of how SphereTraceByChannel functions. Red lines shows where the "trail" is projected from, until it registers as a "hit" on the wall where it turns green. We can understand this function as a "beam" that the player shoots out from its hand.

Hit Result

Two results come out of the Sphere Trace By Channel lead to the two nodes we are using here: Branch and Break Hit Result.

  • Branch: Condition becomes: following node will be executed if the trace hits anything. Otherwise, do nothing

  • Break Hit Result: Based on what the trace hits, return a bunch of results. What we are using here are Impact Point and Hit Actor.

    • Impact Point: will be passed to Hitting Actor and updated to the HookPoint parameter to record where the hit happens.

    • Hit Actor: will be passed to Hitting Actor and updated to the Actor Hit reference parameter.

Hitting Actor

This is a custom function that was used to "make the hit count". Will go over in detail next. It outputs a reference to the Harpoon Actor that gets spawned on the hit-scanned target.

Checking for tags & BPI

Vital step to know "what are the targets that we hit". Unless major changes have been made, major enemy in this game will have the implement interface BPI_Harpoon (means enemy, items, or any other actors that should interact with the harpoon). and the tag Enemy (obviously). For the sake of readability, I made a parameter, referencing to the hit actor that was passed in. Once it passes the "hookable" exam, the location of this hit will be recorded to Hook Point. Then this function detects if the hit actor is an enemy.

Simple Enemy Dummy

Simple enemy dummy that reacts to the hit.

Ragdoll function

Disable movement: literal

Set Simulate Physics: gravity will apply to component, meaning it will be falling to the ground if no other force applied

What is a BPI?

Blueprint Interface: a function that can be used across different classes (in this case, different enemies).

How to Apply BPI to a Class?

BP -> Class Settings -> Interfaces -> add Implemented Interfaces

  • For instance, all objects that can interact with the harpoon should have the implement interface BPI_Harpoon

TODO after Sep 30th : hookpoint/harpoon point interaction update

  • use of interface between programs

  • use of attach actor to component


  • implementation:

    • harpoon shot effects: force applied to target enemy.

    • passing damage data/number through from damage applyer to damaged target.

Harpoon Overhaul

  • Using projectile spawning

  • Using Interface for Actor-To-Actor interaction

Harpoon Test-Kit

Cone-shaped enemy object for debugging harpoon

First-Person to Third-Person


Project Migration Steps:

(this is for porting Matthew's world into the harpoon branch)

  • Create an empty project (since this is just copying a level)

  • switch to Matthew's branch then select file -> Asset Actions -> Export

  • then select the files needed, port them into the new project

  • switch to Harpoon Branch, open the new project and repeat 2-4

    • be careful of name conflicts