Attack System

Melee Weapon

Here we put a link to the object (model) of our weapon, but it needs to be configured to function.

To do this, our object must have the following components :

  1. Melee Weapon

  2. Box Collider

  3. Rigidbody

Melee Weapon

Damage

Indicates the damage that will be inflicted when hitting an

Impulse

The pulse that will be communicated to the attacked charact

Decal Mapping

It is a repository of decals.

We can set the physical material or texture we need on the terrain.

And install a set of decals for it.

Box Collider

We install it at the place of the model, in contact with which damage should be inflicted.

The damage will be dealt once upon contact.

Rigidbody

We need it in order for the trigger to be triggered when interacting with the blade.

We need Is Kinematic so that it does not fall.

Inactive Access

This parameter is responsible for a quick attack with a cold weapon.

Quick attack - when you click on a given button, the character will remove the weapon from his hands, take out a cold weapon and make a blow with it, then remove the cold weapon and take out the removed weapon back.

In order to correctly configure this parameter, you need to enter the name of the action from the input system in the Input Action Name field :

Please note that the names must match to work.

After we have set a new action, we need to configure the button on which it will be called, for this we go to <No Binding>

Then we go to Path and there we select the platform we need and select the key.

If you can't find the key you need in the list, but you have the right gadget at hand, then you can click on Listen and then click on the button you need on the gadget and this button will be added to the list below.

After all the settings, if everything is done correctly, when you click on the selected button, a quick attack with cold weapons will occur.

Last updated