Question about the player reference

Instead of creating a reference to player inside the level, couldn’t we just pass the body/player object when we emit the touched signal?

looking at it, possibly but I havent tried it.

i think we got a reference to player in the level scene, just to make it more readable and straight forward when carrying out the resetting positions as we reserve the players position etc in the ready of the level script.

if we do the player class check in the body entered signal of the, we could pass that player reference through the signal, then use that to be passed again to the reset player method since we need it to access its transform properties.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms