This manual explains the “Object Mount Target” node and the “Mount ID” feature introduced in version 1.0.14.
What is the “Object Mount Target” Node?
The Object Mount Target
node allows you to specify where an object (generated via FireBullet
, GenerateObject
, etc.) should be spawned in the scene tree.
You assign a Mount ID (a string value) to this node. If you specify this Mount ID in an object generation action, the generated object will be created as a child of the corresponding Object Mount Target
node.
For example:
- Set the Mount ID of an
Object Mount Target
node to"target1"
. - In the
FireBullet
action for a player, set the generation Mount ID to"target1"
. - The bullet will be generated as a child of the node with the
"target1"
Mount ID.
This is similar to how
Camera Target Settings
andTarget ID
work for camera follow behavior.
If no Mount ID is specified, the generated object will be created under the Parallax2D
node the spawner belongs to.
Use Case 1: Generating Objects on the UI Layer
Since the UI layer typically doesn’t use Parallax2D
nodes, you must use an Object Mount Target
when generating objects from UI elements.
Use Case 2: Generating Objects to a Different Layer
Previously, all generated objects were forced to appear on the same layer as their spawner.
With this feature, you can generate them on a different layer without needing a “move layer” action.
Example:
- A turret in the background can now generate bullets that appear on the foreground layer alongside the player without extra configuration.
About the Deprecated ObjectRoot
Node
The ObjectRoot
node, used in versions 1.0.13 and earlier, served a similar purpose.
As of version 1.0.14, Parallax2D
replaces this functionality, and ObjectRoot
is considered deprecated.
While it still functions, we recommend replacing it:
- Move its child objects one level up in the hierarchy (e.g., directly under
BaseLayer
or otherParallax2D
nodes).
However, since the UI layer does not contain Parallax2D
nodes, you should continue using Object Mount Target
nodes for any UI-related object generation.