<vizact>.walkTo

Generates a walking action

 

<vizact>.walkTo(
    pos    
    walkSpeed = 1.7    
    turnSpeed = 90    
    walkAnim = AVATAR_WALKSTEP    

)

 

pos

The [x,y,z] target location


walkSpeed = 1.7

The speed to walk with (meters/sec)


turnSpeed = 90

The speed to turn with (deg/sec)


walkAnim = AVATAR_WALKSTEP

The animation to play while walking. If None, the animation state of the avatar will not be affected.


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. If turnSpeed is set to 0 the avatar will turn in place towards the destination, then walk to it.

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])

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

See also

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