Skip to content

Strikes

When a character attacks with a Skill there is a phase called Strike in which the current weapon(s) collect any hit enemies and pass the information to the Skill in order to determine if each of the enemies hit was successful, blocked, parried or ignored.

Upon entering the Strike phase, the Skill looks up all the Striker components of the weapon object(s) and gathers any overlapping enemies.

Using multiple Weapons

If the character has equipped more than one weapon and the Skill requires one of them to hit the enemies, you can specify the ID of the Striker by changing the dropdown value from All to By ID.

Melee Skill Strike by ID

A new ID field will appear below where the Striker id value can be specified

The Striker Component

Strikers are components attached to game objects (usually props that represent weapons) that detect hit enemies when the character attacks.

Melee Striker Component

The ID allows to hand-pick Strikers by their unique identifier in each Skill.

The Section game object reference allows to define where the Blade of the weapon is. By default, it should be the game object where the Striker component is attached to, but some weapons, like a whip, might require mobile parts to work as the hitting part.

Melee Striker Scene View Configuration

The Shape dropdown allows to define the shape of the physics volume that captures enemies when passing through them. There are different options:

  • Sphere: The most basic shape. It captures enemies within a defined radius.
  • Capsule: A pill-like shape that captures enemies along its length and is defined by a radius and a height value.

The Trail section defines two points in which a trail is drawn whenever the weapon is used during a Strike phase.

It also determines the maximum amount of Quads allowed to draw the trail mesh, it's total Length and the Material used.

Melee Skill Strike Weapon Trail

The Trail

When a Skill enters the Strike phase, all Striker components that are involved start drawing the Trail effect, which is automatically faded upon finishing the phase.

The Trail is drawn using a Catmull-Rom spline with regular intervals so that it looks smooth regardless of the speed at which the animation plays.

Point A and Point B define the segment from which the trail will be drawn.

Visualize the Trail

During play-mode you can visualize the Trail by selecting the character executing the Skill. It will automatically draw the quads on top of the trail's material so you can visually see whether that particular skill needs more or less quads in order to look good.

Melee Striker Trail visualization

Predictions

When capturing enemies that the weapon passes through there is a chance that enemies ghost-through if the Striker shape is very small and the animation plays very fast.

Melee Skill Strike

The Predictions field allows to determine inter-frame physics casts that are performed each frame to avoid this problem.

For example, setting a value of 5 means it will capsule-cast 5 times every frame between the weapon position at the last frame and the current one. You can visualize the predictions by selecting the character executing the skill and seeing how each colored volume appears:

  • Green Volume: Shows the current frame weapon's cast volume position.
  • Blue Volume: Shows the predicted volumes positions.

Melee Skill Striker Predictions

Performance Toll

While it's easy to increase the number of predictions to minimize the chance of ghosting-through enemies, each prediction has a direct performance impact on the physics engine. It's better to keep them at a minimum if there are going to be lots of enemies fighting at the same time.