Vizard 7 » Command Index » Vizard modules » vizact » <vizact>.walkTo
7.6

<vizact>.walkTo

Generates a walking action

<vizact>.walkTo(  
pos  
walkSpeed = viz.AUTO_COMPUTE  
turnSpeed = 90  
walkAnim = viz.AUTO_COMPUTE  
verb = 'walk'  
turnInPlace = False  
)  
pos
The [x,y,z] target location
walkSpeed = viz.AUTO_COMPUTE
The speed to walk with (meters/sec).
If viz.AUTO_COMPUTE is specified, the verb parameter is used to lookup the default walk speed in the avatar cfg file.
turnSpeed = 90
The speed to turn with (deg/sec)
walkAnim = viz.AUTO_COMPUTE
The animation to play while walking.
If None, the animation state of the avatar will not be affected.
If viz.AUTO_COMPUTE is specified, the verb parameter is used to lookup the default walk animation in the avatar cfg file.
verb = 'walk'
The type of walk to perform. This value is used when viz.AUTO_COMPUTE is specified for either the walkSpeed or walkAnim parameters.

For walkSpeed, the value of the cfg option with the name verb + '_speed' will be used.

For walkAnim, the value of the cfg option with the name verb + '_animation' will be used.

For example, if the verb is 'run', then the cfg options 'run_speed' and 'run_animation' will be used to determine the speed and animation.
turnInPlace = False
If True, the avatar will turn in place to face the destination, and then begin walking towards it.

Remarks

This will generate an action that will animate the avatar walking to the given location. When the avatar starts this action it will walk with the given walkSpeed. While it is walking it will turn towards its final destination with the given turnSpeed. If the turnSpeed is too small, Vizard will automatically adjust it to the minimum required amount to be able to reach the destination.

Return Value

An action that can be applied to any avatar object

Example

male = viz.add('vcc_male.cfg')

walk = vizact.walkTo([3,0,5])
run = vizact.walkTo([-3,0,5],verb='run')

#Walk to [3,0,5]
male.addAction(walk)

#Run to [-3,0,5]
male.addAction(run)

See also

<vizact>.animation
<vizact>.headto
<vizact>.speak
<vizact>.turn