ibrahim-syah / FPSCore

First Person Shooter in Lyra
0 stars 0 forks source link

Lyra First Person Shooter

This is my attempt at implementing first person character based on Lyra. This repo is a game feature plugin that only depends on the base Lyra classes and assets (no dependencies on ShooterCore). Here is a quick demo.

This setup is inspired by philspaz and Octahedron

Prerequisites

Base Class Changes

I tried my best to make minimal changes to the base Lyra classes, but changes here and there are inevitable and some classes are more trouble than its worth to extend.

ALyraCharacter -> LyraGame/Character/LyraCharacter.h

ULyraCameraComponent -> LyraGame/Camera/LyraCameraComponent.h

UPhysicalMaterialWithTags -> LyraGame/Physics/PhysicalMaterialWithTags.h

ULyraGameplayAbility_FromEquipment -> LyraGame/Equipment/LyraGameplayAbility_FromEquipment.h

FLyraGameplayAbilityTargetData_SingleTargetHit -> LyraGame/AbilitySystem/LyraGameplayAbilityTargetData_SingleTargetHit.h

ULyraReticleWidgetBase -> LyraGame/Equipment/LyraGameplayAbility_FromEquipment.h

FLyraAnimLayerSelectionSet -> LyraGame/Cosmetics/LyraCosmeticAnimationTypes.h

ULyraDevelopmentStatics -> LyraGame/System/LyraDevelopmentStatics.h

ULyraRangedWeaponInstance -> LyraGame/Weapons/LyraRangedWeaponInstance.h

ULyraEquipmentDefinition -> LyraGaame/Equipment/LyraEquipmentDefinition.h

ULyraWeaponInstance -> LyraGame/Weapons/LyraWeaponInstance.h

ILyraAbilitySourceInterface -> LyraGame/AbilitySystem/LyraAbilitySourceInterface.h

ULyraEquipmentInstance -> LyraGame/Equipment/LyraEquipmentInstance.h

ULyraEquipmentManagerComponent -> LyraGame/Equipment/LyraEquipmentManagerComponent.h

ULyraInventoryItemInstance -> LyraGame/Inventory/LyraInventoryItemInstance.h

UInventoryFragment_EquippableItem -> LyraGame/Inventory/InventoryFragment_EquippableItem.h

ULyraAbilitySet -> LyraGame/AbilitySystem/LyraAbilitySet.h

ULyraWeaponUserInterface -> LyraGame/UI/Weapons/LyraWeaponUserInterface.h

ULyraWeaponStateComponent -> LyraGame/Weapons/LyraWeaponStateComponent.h

ULyraAnimInstance -> LyraGame/Animation/LyraAnimInstance.h

ULyraHeroComponent -> LyraGame/Character/LyraHeroComponent.h

ULyraQuickBarComponent -> LyraGame/Equipment/LyraQuickBarComponent.h

Lyra Animation Blueprints

ALI_ItemAnimLayers -> Content/Characters/Heroes/Mannequin/Animations/LinkedLayers

UppoerBodyPose_OverrideState

ABP_ItemAnimLayersBase -> Content/Characters/Heroes/Mannequin/Animations/LinkedLayers

SetUpperBodyPoseOverrideWeight

anim-layer

ABP_Mannequin_Base -> Content/Characters/Heroes/Mannequin/Animations

abp-mannequin-base

ABP_WukongAnimLayers -> Plugins/FPSCore Content/Characters/Heroes/Mannequin/Animations/Locomotion/Wukong

abp-wukong-layer

If you want to add more weapons, instead of creating new set of locomotions animation (and configuring the different animation notifies and graphs for each individual sequence) you can just create a single upper body pose while still using Lyra's locomotion for everything else.

Installation

Make sure that you have made the changes above to your Lyra classes and then just clone this repo to <your-project>/Plugins/GameFeatures.