Function _IrrAddRotationAffector

au3Irr2

au3Irr2 Function Reference

_IrrAddRotationAffector

Adds a an affector to a particle system rotating the particles.

#Include <au3Irrlicht2.au3>
_IrrAddRotationAffector($h_ParticleSystem, $f_SpeedX, $f_SpeedY, $f_SpeedZ, $f_PivotX, $f_pivotY, $f_pivotZ)

 

Parameters

$h_ParticleSystem Handle of the particle system the created affector is attached to.
$f_SpeedX, $f_SpeedY, $f_SpeedZ Set the speed in degrees per second in all 3 dimensions.
$f_PivotX, $f_pivotY, $f_pivotZ Set the point that particles will rotate around.

 

Return Value

success: Handle of the created affector.
failure: false

 

Remarks

This affector modifies the positions of the particles and attracts them to a specified point at a specified speed per second.

 

Related

_IrrAddParticleSystemToScene, _IrrSetParticleAffectorEnable, _IrrRemoveAffectors

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

; add particle system with default emitter to the irrlicht scene manager
local $particleSystem = _IrrAddParticleSystemToScene($IRR_DEFAULT_EMITTER)
local $ParticleTexture = _IrrGetTexture( "./media/ParticleGrey.bmp" )

; setup affector rotating particles around all three axes with particles attracted to 30/0/0:
_IrrAddRotationAffector ( $particleSystem, 50.0, -120.0, 50.0, 30.0,0.0,0.0 )

_IrrSetNodeMaterialTexture( $particleSystem, $ParticleTexture, 0 )
_IrrSetNodeMaterialFlag( $particleSystem, $IRR_EMF_LIGHTING, $IRR_OFF )
_IrrSetNodeMaterialType ( $particleSystem, $IRR_EMT_TRANSPARENT_ADD_COLOR )

local $nodeCamera = _IrrAddCamera( 80,0,0, 0,50,50)

WHILE _IrrRunning()
    _IrrBeginScene( 0,0,50 )
    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()