SgGroup¶
A container node that holds and organizes child scene objects. Allows hierarchical transformations and grouping of related elements. Useful for moving, rotating, or scaling multiple objects as a unit.
Inherits from¶
Usage¶
To use this class, add the following require at the top of your script:
local SgGroup = require 'engine/sceneobjects/sggroup'
Reference¶
- class SgGroup¶
- module:
- create(options, parent)¶
Create a new group object in the scenegraph.
- Parameters:
options (
table
) – A table of options to fill the parametersparent (
SceneObject
) – The parent scene object to add this to
- Returns:
a promise which will resolve to the created object
- Return type:
Promise
Usage:
1 2 3 4 5 6 7 8 9 10 11
-- Options can be omitted. This example shows the defaults, -- only specify the ones you want different. SgGroup:create({ active = true, name = "", transform = Transform.new(), layers = {0}, tags = {}, receiveShadow = false, castShadow = false })