Overwatch Zarya’s Ultimate in UE4

Jul 4, 2016·
Akbolat Sadvakassov
Akbolat Sadvakassov
· 2 min read

Hi everyone!

Welcome to another tutorial about abilities of Overwatch heroes, in this we will make Zarya’s ultimate.

Tutorial based on FirstPersonTemplate. UE4 version 4.12.3

Link to project –» Google Drive

Logic

Her ultimate, as written above is Graviton Surge(or Bomb), as we know from previous tutorial, bombs are Projectile. So instead of creating new Blueprint, we’ll just duplicate existing, in this template FirstPersonProjectile, and name it UltimateProjectile.

In short, we launch gravi-bomb, when it hits to anything we create Sphere-Trace, everything that is inside of sphere is written to the array, and every element of array we move to center of sphere.

Open UltimateProjectile, in Components select Projectile(or Projectile Movement), in Details/Projectile Bounces uncheck Should Bounce. Now let’s create blueprints.

In EventGraph delete all nodes, except EventHit and create a custom event Blackhole.

Create variables:

  • boolean isHit? – collision test,
  • Vector Height – is height at which Blackhole spawns. Equal {0;0;100}
  • Array Actor ActorsInBlackhole – actors, that will be “pulled”.

Gravi-bomb explodes in two cases,

  • first(starts from BeginPlay), if there was no collision, is set life span for 3 seconds, then it immediately blows up.
  • second(from EventHit), if collision triggered, we set isHit to True, increase scale(SetRelativeScale) and lift(SetWorldLocation)the bomb. Then, create Trace-sphere(MultiSphereTraceByChannel) with parameters – Start(coordinates of that blueprint – GetActorLocation); End( same as Start + 1, else it wouldn’t work), Radius(750 units) and Draw Debug Type(ForDuration). Results of Trace-sphere we write to an array ActorsInBlackhole using ForEachLoop. At the end of loop, we call Blackhole custom event. Now let’s implement Blackhole event:

There is we use Sequence, to call to Timelines. First is for moving objects to the center of Blackhole. We iterate an array, for every element set new coordinates(SetActorLocation). And second, to make circle around the center, instead of straight.

Timelines

If you don’t know what is it Timeline, just google it or watch YouTube. Then, prepare two timelines:

First Timeline with Float graph

First Timeline with Float graph

Second with Vector graph

Second with Vector graph

VFX

That’s all the logic. Now will add some cosmetics stuff. Use M_BlackHole_Fresnel material for sphere in UltimateProjectile blueprint, to distinguish gravi-bomb. Link to download(Source, and look at comment below, written by Yoeri -Luos- Vleer)

The last thing is binding ability to Q key button. In FirstPersonCharacter blueprint:

In SpawnActor/Class set UltimateProjectile

In SpawnActor/Class set UltimateProjectile

Result


It’s a mirror from WebArchive