This plugin allows you to load animated and pre-textured GLTF models into your game.

How to use: first, load the model you want into a map object. This will replace the object’s mesh (the graphics). You can then change the model’s properties and animate it. This plugin comes with an “on map load” event. Create a custom event for your game and assign its ID to the plugin’s parameter. Your event will now trigger on map load.

General tips: loading models can cause momentary lag (during the load process only). Try to load all the models you want on the map in one go, and make a loading screen to mask it. There’s an “on all models load” event to help with that, which triggers when a set number of frames passes after the last model’s been loaded, but only once per map. The map objects with assigned GLTF models are treated as regular 3D map objects, so they have a direction. If you want to control the object’s direction via plugin only, make sure to check the “direction fix” box on the map object. You can then retrieve the rotation (in degrees) on the Y (vertical) axis. This will account for the plugin rotation only. Finally, you can use the “get model info” method to retrieve the model’s size and animations list.

Author: Russo

Categories: Plugin