Group
Groups child scene composables under a single transform. Everything declared inside content is parented to a hidden transform entity, so moving/rotating/scaling the Group moves the whole assembly as a unit. Children's own position/rotation/scale become local to the group, and groups themselves nest cleanly inside other groups.
Group(position = Position(2f, 0f, 0f), rotation = bodyRotation) {
Cube(material = body, size = 1.5f)
Cylinder(material = wheel, position = Position( 0.6f, -0.4f, 0f), radius = 0.2f, height = 0.1f)
Cylinder(material = wheel, position = Position(-0.6f, -0.4f, 0f), radius = 0.2f, height = 0.1f)
}Note: a Light inside a Group is parented like any other child, so the group's translation moves it. But a light's direction comes from its direction parameter, not the transform, so rotating a Group does not rotate the light it contains.
Parameters
World-space position of the group's pivot (or local-space if this Group is itself nested inside another Group).
Rotation applied to the whole group.
Scale applied to the whole group.
Mesh-space pivot point that rotation/scale revolve around.
Receives the group's transform entity ID once it's created.