Skip to main content
Inspiring
November 26, 2025
Question

Scripted Avatar Movement

I'm using the world creation app to create.

Is Scripted Avatar Movement this link:

https://developers.meta.com/horizon-worlds/learn/documentation/create-for-web-and-mobile/typescript-apis-for-mobile/scripted-avatar-movement

 

is this for NPC's?

I'm asking because I don't see any examples code.  The references to locomotion that I do see videos and tutorial worlds is for NPC movement.

Is there any examples?  if so would you share them?

 

 

 

Thanks

3 replies

Participant
November 29, 2025

Hi Meishameta​ , not a Horizons Worlds user (nor I have tested it out) but based on how I interpreted from the documentation, the above link is for moving the local player (i.e. yourself) via tapping on screen in mobile.

The NPC movement based on the tutorial worlds might be using different script functions (e.g. nav-mesh), but I could be wrong.

Inspiring
November 29, 2025

thanks for responding.  If it's not too much trouble, how did you come to that conclusion?

I'm just curious.

Participant
November 30, 2025

If you read and interpret through the sample code in link, the locomotion is assigned to the local player. 

 this.localPlayer.moveToPosition(startRaycastHit, {movementSpeed: this.props.movementSpeed});

Not sure if this also can be re-used to NPCs though.