A scene that shows a character walking along a fixed path, using lerp over each segment of the path. If you approach it, it will switch to yelling at you.
This scene shows you:
- How to add 3D models to a scene and call their animations
- How to use a system to make an NPC walk around a predetermined path
- How to check the proximity of a player to an NPC and react
- How to rotate an entity to face the player
- How to create a custom component to store custom data
Read a tutorial blog post about this scene:
Install the CLI
Download and install the Decentraland CLI by running the following command:
npm i -g decentraland
Previewing the scene
Download this example and navigate to its directory, then run:
$: dcl start
Any dependencies are installed and then the CLI opens the scene in a new browser tab.
Scene Usage
Gnark walks in circles, patrolling his temple. If you approach him too much, he will face you and scream a battle cry!
Learn more about how to build your own scenes in our documentation site.
If something doesn’t work, please file an issue.
The 3D model for the character used in the scene is an asset courtesy of BitGem. The model is not free to use, but with the coupon code DecentralandKing
you can obtain it with a 100% discount on their site.
Other 3D models in this scene are developed by Decentraland's art team and free to use under the Apache 2 licence.
This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.