# Set3DParticlesDirection

## Description

Sets the initial direction of new particles when they emerge from the emitter. This can be used along with the Set3DParticlesDirectionRange command to set the range of variation from this initial direction that new particles can choose. This also sets the initial speed of the particles by taking the length of the vector as units per second. For example if the initial direction is vx=10, vy=-15, vz=0 particles will begin by moving in the X direction at a rate of 10 units per second and in the Y direction at a rate of 15 units per second and will continue this rate of motion for their entire life unless influenced by forces added with Add3DParticlesForce.

## Definition

Set3DParticlesDirection( ID, vx, vy, vz, roll )

void agk::Set3DParticlesDirection( UINT ID, float vx, float vy, float vz, float roll )

## Parameters

- ID - The ID of the emitter to modify.
- vx - The x direction that particles will move initially.
- vy - The y direction that particles will move initially.
- vz - The z direction that particles will move initially.
- roll - The angle to turn the emitter as it is facing in the given direction