Forum Discussion

Meishameta's avatar
20 days ago

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

  • 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.

    • Meishameta's avatar
      Meishameta
      Member

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

      I'm just curious.

      • RayNg_XRBootcamp's avatar
        RayNg_XRBootcamp
        Protege

        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.

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions