So how does it work? It’s still in Alpha and subject to change, but let’s explore what we have available.
The basic building blocks of visual scripting are Movable Shapes and Movable Neons. You can access both from the Visual Scripting section in the builder.
These are just like normal shapes & neons, except with some extra abilities. So you can color, stretch, and align them as you usually would.
When you’re ready to start the magic, just check out the Settings panel on the right.
A few basic functions:
- Speed (movement speed)
- Loop button (repeats the animation over and over)
- Path types
- Linear (move at a constant speed)
- In Out Quart (start slow, speed up, then slow at the end)
- In Out Back (similar to Quart, but bounces / whips at the ends like a pendulum)
- End Color — when Record mode is on, you can change the color of the object. It will then transition to that color as the animation plays.
Note: Currently movable objects are not synchronized across users — so you may see something start moving at a different time than other users. I’m sure this will be remedied in the future.
Currently, visual scripting only allows you to move an object to one other location in a fixed line. So you hit the Record button to start, then use the arrows to move your object to its final location, then hit Stop to save that location.
You can preview your movement by flipping the Start toggle and then pressing the play arrow.
Want to see where other objects will complete to align multiple objects? Just tick the Show All Directions checkbox.
When you do this, all standard building functions are available. In other words, you can use Vertex snapping (hold V and click on another object) and other alignment techniques to perfectly align the end states of the objects.
Just make sure to hit Show All Directions after selecting the end state of your object.
There are currently 3 primary ways to initiate object movement:
- Start – starts the object moving as soon as you enter the parcel
- Trigger Play – starts the object once the user clicks on it
- Chaining – starts the object based on another object
If multiple objects have Start as their trigger, and they have the same speed, then they will all move in unison — enabling you to build complex structures that act like a single complex object. (e.g. cars, birds, etc.)
However, there’s another way to link the movement of multiple objects together: Chaining.
In this example, the movement trigger for the blue sphere is Trigger Play — it will wait until someone clicks on it to start.
However, the red sphere has all movement triggers turned off, as it’s being moved by the blue sphere.
In the dropdown from the 1st object (blue sphere), I chose “controller: movable item 2”, which means that it will tell the 2nd item (red sphere) when to start.
Quick tip: To see which object you’re selecting from the controller dropdown, just hover over the dropdown item, and it will be highlighted in blue.
In this case, if I click on the blue sphere, the red sphere will start at the exact same time, because I flipped the Immediate Activation toggle.
If I left Immediate Activation off, then the red sphere would wait until the blue sphere was done with its route before starting.
You can then set the 2nd object to control a 3rd object, etc.
Thus by combining Trigger Play with the 1st item, and then chaining controllers, and using Immediate Activation, it’s possible to launch complex, multi-object builds that wait for the user to click on them to start.
Although there’s a bit of a learning curve, once you understand how everything fits together, it’s possible to create some very sophisticated builds with 0 coding experience.
If you have any questions about Visual Scripting, just head to the Somnium Space Discord and post your Qs in the #ask-questions channel!