Function _IrrSetNodeAnimationSpeed

au3Irr2

au3Irr2 Function Reference

_IrrSetNodeAnimationSpeed

Change the speed at which an animation is played for a node

#Include <au3Irrlicht2.au3>
_IrrSetNodeAnimationSpeed($h_Node, $f_Speed)

 

Parameters

$h_Node Handle to a character scene node.
$f_Speed How many frames per second.

 

Return Value

Success: True
Failure: False

 

Remarks

You could use this to make a character run slowly or quickly and still keep its feet on the ground.

 

Related

_IrrGetMesh, _IrrAddMeshToScene, _IrrGetMeshFrameCount, _IrrGetNodeAnimationFrame, _IrrSetNodeAnimationRange

 

Example


#include "au3Irrlicht2.au3"

Global $hMD2Mesh, $hMeshTexture, $hSceneNode

_IrrStart()

$hMD2Mesh = _IrrGetMesh("./media/zumlin.md2")
$hMeshTexture = _IrrGetTexture("./media/zumlin.pcx")
$hSceneNode = _IrrAddMeshToScene($hMD2Mesh)
_IrrSetNodeMaterialTexture($hSceneNode, $hMeshTexture, 0)
_IrrSetNodeMaterialFlag($hSceneNode, $IRR_EMF_LIGHTING, $IRR_OFF)

_IrrSetNodeAnimationSpeed($hSceneNode, 75)

_IrrAddCamera(50, 0, 0, 0, 0, 0)

While _IrrRunning() And Sleep(10)
    _IrrBeginScene(240, 255, 255)
    _IrrDrawScene()
    _IrrEndScene()
WEnd

_IrrStop()