After importing the 3D models will appear in the Desktop editor in the “Resources” tab. Learn more about downloading resources

3D models are marked with a characteristic icon

Behaviors are defined for the model:

How to add a 3D model to the scene

  1. Simply drag the 3D model from the “Resources” tab to the scene
  2. First add a “3D Model” object to the scene, then assign a model to it

The animation, if any, will be pulled in automatically

Setting up the “3D model” object in the scene editor

VarwinModel

  • 3D Model - selection of a previously added model from the library

Supported formats: fbx, obj, dae, glb, gltf

Vectors:

  • Scale - parameter similar to scaling but scales the object proportionally at once
  • Rotation is a parameter similar to rotating. Duplicated because different 3d modeling packages have different axis orientations. This can cause the model to “lie down” when imported. Here you can adjust the orientation of the model so that it “stands” with zero rotation values in the parameters. Rotation is divided into three rotation axes, X, Y and Z, respectively
  • Position is a parameter similar to position. Duplicated for the same reason as the “Rotation” parameter. It is intended to align the model inside the “3D model” object if the imported model has a displaced pivot point *

*Pivot is the point relative to which the model should align

  • Animation enabled - the parameter enabling the animation of the 3D model, if any

If this option is not enabled, all animation settings made in the Blockly logic editor will not work!

  • Animation shift - can take values from 0 to 1, where 0 is the beginning of the animation (i.e. no shift), and 1 is the end

An example of a 3D model, with an incorrect pivot in Varwin

Model with corrected orientation: x: 90, y: 0, z: 0

Blockly

The main interaction with the 3D object takes place inside the built-in Blockly logic editor

The default block types for the object are as follows:

Actions

This set of blocks allows the user to customize the animation if it is built into the 3D object originally

Start animation № X - the block that starts the animation with the specified number, as the number of animations in the 3D model can be any Play/stop/stop current animation - the block that works with animation playback

Variables

  • Animation playback speed N - if the 3D model has a built-in animation, this parameter adjusts the speed of animation playback

the value for animation playback speed can be either positive or negative, which will slow it down

  • Animation playback single/non-single - the parameter that enables the animation to repeat after its completion

  • Animation playback direct/reverse/ping-pong - sets the type of animation playback:

    • Direct - normal animation play from the beginning to the end

    • Reverse - playing animation from the end frame to the first one, i.e. vice versa

    • Ping-pong - animation playback, where the first time animation is direct, the next time - reverse, and so on

  • Get animation playback from object - a variable that returns the current state of the 3D object, whether it is animated at the current moment or not

If your animation settings don’t work, check in the scene editor if the Animation is enabled checkbox of the corresponding 3D model is checked!

Events

  • Animation completed - an event that runs after the 3D model animation is finished
  • Animation paused/stopped - the event trigger is either paused animation, or its complete stopping