VectorDirection3D QML Type | Qt Quick 3D 6.1.0

- Qt 6.1
- Qt Quick 3D
- QML Types
- VectorDirection3D QML Type
- Qt 6.1.0 Reference Documentation

# VectorDirection3D QML Type

For specifying a direction towards the target direction. More...

Import Statement: | import QtQuick3D.Particles3D .
Inherits: | Direction3D

- List of all members, including inherited members

## Properties

- direction : vector3d
- directionVariation : vector3d

## Detailed Description

This element sets emitted particle velocity towards the target direction vector. The length of the direction vector is used as the velocity magnitude.

For example, to emit particles towards some random direction within x: 50..150, y: -20..20, z: 0:

     ParticleEmitter3D {
         ...
         velocity: VectorDirection3D {
             direction: Qt.vector3d(100, 0, 0)
             directionVariation: Qt.vector3d(50, 20, 0)
         }
     }

## Property Documentation

direction : vector3d

This property defines the direction for particles target.

The default value is `(0, 100, 0)` (upwards on the y-axis).

See also directionVariation.

directionVariation : vector3d

This property defines the direction variation for particles target.

The default value is `(0, 0, 0)` (no variation).

See also direction.