Hello!
I know this has already been covered on the forum,
but unfortunately I couldn't get it to work so far.
A short description of what I try to do:
The player is in a room where he uses an inventory item like a phone or minigame gadget, which triggers a scene change to a scene in which the player is not visible.
Before the scene switch I want to have the current player position recorded to a Vector3 variable with the Object - Record Transform action, in order to return to the exact position from where the item was accessed, when switching back to the original scene.
The original scene has an variable check on start, if it was entered through the gadget scene. This is set up properly, as I checked with further test actions.
But I tried with various settings of the Object - Transform and Object - Teleport actions to restore the player position at this point, but it always returns at the original PlayerStart2D marker.
Here is a screenshot of the action settings in question and of the Vector3 variable:
With the Object - Transform I tried both "translate to" and "translate by" position.
And I also tried with a "Remember Transform" component attached to the player prefab.
Probably something is wrong with the setup for my Vector3 variable?
I would be very thankful for any help.
Comments