How to let the avatar move automatically?

Hi, I am currently trying to make the avatar move automatically in some situations. For example, when the system detect the movement of the right hand, we want to let avatar move forward. Is it possible to create this feature by running script? Can you guys give me some suggestion about creating this feature. Also, I tried to type setJoinRotation() in the script console but the avatar doesn’t show anything. Are there anythings that I need to do more in order to let the avatar make a action? Every suggestion will be really helpful!

setJointRotation is a command to manipulate the bones on an avatar. It doesn’t effect movement.

Movement can be adjusted with the motor controls (MyAvatar.motorVelocity). I don’t dabble with that too much so I cannot say how it works.

Thanks for replying me!
I think setJointRotation and setJointTranslation doesn’t work anymore. setJointData is the one takes place of those two functions. Also, I ain’t sure how MyAvatar.motorVelocity works. To me, it seems like it is a target velocity for myAvatar to achieve and it requires pressing keyboard. I don’t see any different after I typed MyAvatar.motorVelocity = {x: 0, y: 0, z: 0};. I wonder if there are more things need to be done. I am still looking for any code that can make avatar move without pressing keyboard and through codes.

Regarding setJointRotation(), see the sample provided in the API docs: https://apidocs.highfidelity.com/MyAvatar.html#.setJointRotation

MyAvatar.motorVelocity = { x: 0, y: 0, z: 0 } will be setting the target velocity to “zero”, i.e., stationary.
You’ll also need to set MyAvatar.timescale to something smaller than the default and possibly MyAvatar.referenceFrame (e.g., to “world”).