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

TargetDirection3D QML Type

For specifying a direction towards the target position.

This type was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

TargetDirection3D QML Type▲

  • Import Statement: import QtQuick3D.Particles3D

  • Since: Qt 6.2

  • Inherits: Direction3D

Detailed Description▲

This element sets emitted particle velocity towards the target position.

For example, to emit particles towards position (100, 0, 0) with random magnitude between 10..20:

 
Sélectionnez
ParticleEmitter3D {
    ...
    velocity: TargetDirection3D {
        position: Qt.vector3d(100, 0, 0)
        normalized: true
        magnitude: 15.0
        magnitudeVariation: 5.0
    }
}

Property Documentation▲

 

magnitude : real▲

This property defines the magnitude in position change per second. Negative magnitude accelerates the opposite way from the position. When the normalized is false, this is multiplied with the distance to the target position.

The default value is 1.0.

See Also▲

magnitudeVariation : real▲

This property defines the magnitude variation in position change per second. When the normalized is false, this is multiplied with the distance to the target position.

The default value is 0.0.

See Also▲

See also magnitude

normalized : bool▲

This property defines if the distance to position should be considered as normalized or not. When this is false, distance to the position affects the magnitude of the particles velocity. When set to true, distance is normalized and velocity amount comes only from magnitude and magnitudeVariation.

The default value is false.

See Also▲

position : vector3d▲

This property defines the position for particles target.

The default value is (0, 0, 0) (the center of the emitter).

See Also▲

positionVariation : vector3d▲

This property defines the position variation for particles target.

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

See Also▲

See also position

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