Unreal Engine notes
Posted 12/23/2021
This post contains various stuff I want to remember from working with Unreal Engine. It's probably not useful for anyone else.
Adding Gameplay Ability System (GAS) to a project
- Enable the plugin "Gameplay Abilites"
- Add "GameplayAbilities", "GameplayTags", "GameplayTasks" to PrivateDependencyModuleNames in .Build.cs
- Add a new C++ class inheriting from UEngineSubsystem. Call
UAbilitySystemGlobals::Get().InitGlobalData();
invoid Initialize(FSubsystemCollectionBase& Collection)
Adding a GripPoint to the third person SK_Mannequin model
The first person version of SK_Mannequin comes with a GripPoint socket which weapons are attached to, but the third person one doesn't. I added a GripPoint myself using the following transform which seems to work well with rifles at least:
When attaching a mesh to a socket, using Mesh->SetupAttachment(ParentMesh, FName("SocketName"))
seems to work better than Mesh->AttachToComponent(ParentMesh), AttachRules, FName("SocketName"))
.