How to move collection with game object and subcollection?

I have a “bow” collection:

Then I have an “archer” collection, which has the bow:

Then I have the main collection with an archer in it:

I need to move the archer with input keys up or down, but the following code moves only archer - the bow doesn’t move with it.

function on_input(self, action_id, action)
local position=go.get_position()
local new_dir=vmath.vector3()
if action_id==hash("up") then
elseif action_id==hash("down") then
	new_dir=vmath.vector3(position.x, position.y-3., 0)


Bow must be moved with archer. What should I do?

You should move the bow inside the archer’s GO.
Keep in mind that you cannot move “the collection” itself in code, a collection is just a container.
So, all manipulations you should do with GO.

I can’t move it inside GO, it doesn’t allow me

1: why bow is a collection and not a game object?

2: you cannot move sprite components inside a GO, you must move the GO itself

3: if it is possible I would go with two GO’s, one for archer and one for bow and then a collection containing a root GO with inside these two GO’s. In this way you move the root GO to move together the archer and the bow. And, if you want to move only the bow, you move the bow GO.

I hope this make sense to you.