# Lyra's Integration

{% embed url="<https://www.youtube.com/watch?v=1n2tAET4kec>" %}

{% hint style="danger" %}
USE IT ONLY IF YOU ARE AN EXPERIENCED C++ PROGRAMMER
{% endhint %}

[**Playable Demo Lyra**](https://drive.google.com/file/d/1EKhX9SHUXLOdgYm44WLMNo0WIAAkMeL1/view?usp=sharing)

[**Lyra Project With Aim Assist Integration**](https://drive.google.com/file/d/1JM5eY3cbdYjMc08wd3HbFtrktR8qlBBF/view?usp=sharing)

### All made changes for integration in Lyra project:

#### In ULyraGameplayAbility\_RangedWeapon::PerformLocalTargeting added targeting for aim assist<br>

```
	...
	if (const auto aimAssist = AvatarPawn->Controller->FindComponentByClass<UUASAimAssistComponent>())
	{
		const auto rot = aimAssist->GetRotationToCrosshairDirection(InputData.StartTrace, TEXT("AimAssistObstaclesCheck"));
		InputData.AimDir = rot.Vector();
		InputData.EndAim = InputData.StartTrace + rot.Vector() * WeaponData->GetMaxDamageRange();
	}
	...
```

#### Added B\_PlayerController asset, added **UASAimAssistComponent to controller**&#x20;

#### ![](https://735416403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF3k8Ag7XdLaFeHKiXdml%2Fuploads%2Fkrya8s3wZ6NHts5lFn31%2Fimage.png?alt=media\&token=4c6c7be4-3677-4f82-9571-2029b53ae7f2)

#### Added B\_LyraGameMode asset, selected B\_PlayerController  class

![](https://735416403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF3k8Ag7XdLaFeHKiXdml%2Fuploads%2FUEPl3ieShISTq3D6FTdS%2Fimage.png?alt=media\&token=e35fbed4-7d5f-48a5-a701-15973d808e41)

#### In B\_Hero\_ShooterMannequin added UASAimAssistTargetComponent&#x20;

#### In On Team or Cosmetics Changed event realized logic to enable aim assist only for enemies

![](https://735416403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF3k8Ag7XdLaFeHKiXdml%2Fuploads%2FHJun65FvUWIklX4jvkBW%2Fimage.png?alt=media\&token=93ec1f00-a6e4-4230-9952-cb198886223c)

**In IMC\_Default\_Gamepad and IMC\_Default\_KBM added modifiers in look input for Stickiness working**

![](https://735416403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF3k8Ag7XdLaFeHKiXdml%2Fuploads%2FokaosLlOFja7ZpaeXtpr%2Fimage.png?alt=media\&token=e0727e13-72ca-421b-b912-4b01187869f8)

![](https://735416403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF3k8Ag7XdLaFeHKiXdml%2Fuploads%2FS0Vv1LzNbY8tChIErmky%2Fimage.png?alt=media\&token=3b1e5004-7204-4e02-98ee-936f2f328425)
