Lamp instances
The original scene contains four copies of one lamp prefab. Each instance can override its position, scale, color, or rotation speed without changing the others.
Try it
Change the example parameters and compare the result. Reset restores the initial scene.
Starts the scene; open the example parameters to experiment.
Scene6 nodes
Node
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000103
d5600000000000000000000000000101
Node
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
Node
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
Node
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000101
d5600000000000000000000000000103
d5600000000000000000000000000101
Floor
Transform
position[0, 2.6]rotation0scale[1, 1]
Scriptmain.aes
package demo
// Spin turns the Head child of a lamp; each instance overrides Speed.
script Spin {
@export(unit="rad/s")
var Speed float = 2
func Update(dt float) {
head := node.Child("Head")
tr := head.Transform2D()
tr.Rotation += Speed * dt
head.SetTransform2D(tr)
}
}