Open topic with navigation
<vizact>.elapsed
Create a dynamic parameter that will return the elapsed time
<vizact>.elapsed( |
|
value |
) |
|
value
A single number or a list of numbers that will be multiplied by the elapsed time.
Remarks
Dynamic parameters allow you to control the input of an action every time it is performed. An elapsed parameter will return the elapsed time for the current frame multiplied by the specified value.
Return Value
A dynamic parameter that can be passed to any function that generates actions.
Example
ball = viz.add('ball.wrl')
#Move ball forward at 5 m/sec while up key pressed
vizact.whilekeydown(viz.KEY_UP,ball.setPosition,vizact.elapsed([0,0,5]),viz.REL_LOCAL)