3D models

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

../../_images/image_03.png

3D models are marked with a characteristic icon

../../_images/image-148.png

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

../../_images/image-227.png

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

VarwinModel

../../_images/image-324.png
  • 3D Model - selection of a previously added model from the library

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 *

Note

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

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

Warning

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

../../_images/image-416.png

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

../../_images/image-712.png

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

../../_images/image-88.png
  • Animation playback speed N - if the 3D model has a built-in animation, this parameter adjusts the speed of animation playback

Note

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

Warning

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

../../_images/image-94.png
  • 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