Deep dive into core gameplay systems and visual scripting
This system handles the player's basic melee attack logic, ensuring smooth execution, state management, and accurate hit detection.
get: Triggered at the start to make the weapon mesh visible.hit: The precise moment of the strike, routing logic to the hit detection branch.end: Triggered at the end of the animation to hide the weapon mesh.hit notify, the system calculates the attack trajectory. It retrieves the Camera Boom world location, calculates the Forward Vector multiplied by a range offset, and executes a Sphere Trace By Channel. This creates a volume that detects overlaps, ensuring accurate and forgiving hit registration.
A highly memory-optimized environment generator for Endless Runners. Instead of constantly spawning and destroying actors, this system intelligently recycles only two floor tiles to create an infinite path.
BeginPlay, the first tile is cached into a Current Tile variable. When the player steps into the Box Collision, an event is triggered. To prevent execution glitches (multiple fires), the Box Collision's Generate Overlap Events is immediately disabled.Current Tile and offsets its location forward to snap seamlessly behind the second tile. Concurrently, the trigger Box Collision is teleported to the beginning of the newly positioned floor.Select node checks which tile was just moved. If it was Tile 1, Tile 2 becomes the new Current Tile (and vice versa) for the next iteration. Finally, after a brief safety Delay, the Box Collision's overlap capability is reactivated to keep the loop going.