SPAM Framework Documentation

Projectile movement behaviour

img/projectile-movementpng
Each projectile can have individual (or shared) movement behaviour. A movement behaviour is an asset that you configure through the unity inspector after it's created.

Base speed
The base speed of the projectile.

Desired rotation
The desired rotation the projectile should have in flight.

Movement type
Projectile can currently have straight movement (directly towards target) or curved movement. If you select curved movement, more settings will be displayed (see below).

Curved Movement Settings

Here you can set how the projectiles movement should be offset while it's traveling towards its target.
When the given setting is applicable and configured correctly, a green dot will be displayed next to its header. Both a curve and strength must be set for a settings to be applicable.

Horizontal movement
Horizontal movement can be though of as seeing the projectile from a top-down perspective. If you add a positive value, the projectile will be offset to the left of it's current direction, and if you set a negative value, it will be offset to the right (when seen from above).

Vertical movement
This is how the projectile should travel in the Y axis when traveling towards it's target. A value of 0 will not affect it's height, and positive/negative values will raise/lower the projectiles height during flight.

Speed
If you with the projectile to have different speeds at different times of it's path, you can set a curve for it here.

Strength
All curves can either have a constant strength (same movement every time) or random between two constants strength (random strength between given values each time the projectile is spawned). Strength determines how much the curve should affect the projectile's movement direction.

Backlinks: