Drive

From Neos Wiki
Revision as of 19:23, 3 May 2021 by Chemicalcrux (talk | contribs) (Set up a basic description of how driving works.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A drive controls a property.

At a glance

A driven property will appear purple in the inspector window. The value of a driven property cannot be directly changed; trying to do so will have no effect. A property can only have one drive on it at a time.

Locality

Driving a property is very different from writing to a property.

When you write to a property, you are telling everyone else in the session about the new value. This means that the write has to go across the network first. This can be especially problematic if you are writing a value very rapidly; this can result in significant jitteriness for other users.

When you drive a property, you are telling the game to use another value to control it. Each user in the session will continuously set the property to that value. This involves no network traffic, and can make for a very smooth experience.

However, this can cause disagreement: each user is, independently, controlling their own view of that property. If you plug Local User into User Username and drive a text field's content with the output, each user will see their own username.

This is often quite useful. However, this can also cause unwanted divergence: some LogiX nodes, like Constant Lerp, are handled locally by each user. This can cause two people to disagree on the state of the world.

This is usually not a problem if the system you're using is inherently convergent. Constant Lerp trends steadily towards its target value; if everyone has the same target value, then everyone will eventually agree on the output.

Creating Drives

A very common way to create a drive is to use the LogiX Tooltip to create a drive node. For more details, see the LogiX Overview page.

Many components can take a property to drive. ValueCopy reads from one property and drives another one with that value. Simply grab the name of the property you want to control and drop it in.

(editor's note: not ready for translation yet; still making lots of changes!)