IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

VectorDirection3D QML Type

For specifying a direction towards the target direction.

This type was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

VectorDirection3D QML Type

  • Import Statement: import QtQuick3D.Particles3D

  • Since:: Qt 6.2

  • Inherits:: Direction3D

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:

 
Sélectionnez
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 : vector3d

This property defines the direction variation for particles target.

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

See Also

See also direction

normalized : bool

This property defines if the direction should be normalized after applying the variation. When this is false, variation affects the magnitude of the particles velocity. When set to true, variation affects the direction, but the magnitude is determined by the original direction length.

The default value is false.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+