Unreal Engine 4 —— GAS系统学习 (四十)群体技能GroundBlast(8)

欢迎大家加入Unreal Engine C++ & Blueprint群一起交流:1143575617

本节要为GroundBlast招式发招地点增加一个粒子系统。

将ConfirmTargetingAndContinue方法中的代码进行修改,如下:

	FGameplayAbilityTargetData_LocationInfo* centerlocation = new FGameplayAbilityTargetData_LocationInfo();
	centerlocation->TargetLocation.LocationType = EGameplayAbilityTargetingLocationType::LiteralTransform;
	centerlocation->TargetLocation.LiteralTransform = Decal->GetComponentTransform();

	if (overlapedActors.Num() > 0) {
		FGameplayAbilityTargetDataHandle TargetDataHandle = StartLocation.MakeTargetDataHandleFromActors(overlapedActors);
		TargetDataHandle.Add(centerlocation);
		TargetDataReadyDelegate.Broadcast(TargetDataHandle);
	}
	else {
		TargetDataReadyDelegate.Broadcast(FGameplayAbilityTargetDataHandle(centerlocation));
	}

其他代码保持不动。

在招式中增加粒子系统

©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页