Forum rules - please read before posting.

How to copy object transform values TO a marker instead FROM a marker?

edited December 2016 in Technical Q&A
Hello community,

I have a first person player game, including some panorama scenes.

In these panorama scenes, the player is restricted to turning around (Y-Rotation of Player) and moving his head up and down slightly (X-Rotation of Player's child camera).

From every scene of the game (no. 1 to 98), the player has the option to switch to a game map. This game map is a scene in itself (no. 99) and can be accessed via a menu button and back again.

All of this works beautifully, with one exception: I need to record (at least!) the Player's Y-Rotation and (ideally also) the Player's child camera's X-Rotation before changing to the game map, so that after the player returns from the game map, he still looks into the same direction as before and not loses his orientation.

My thought was to record these two values to a "dynamic" PlayerStart before changing to the game map scene, and use this PlayerStart on returning "if previous scene = 99", but I have not been able to figure this out so far – how can I copy object transform values to a marker instead from a marker?

Any ideas? Or maybe even a better one with a better approach than mine?

Thank you!

Comments

  • You could try having two Player prefabs in your game: one for the First Person scenes, another just for the map scene.  You could then use the Player: Switch Action instead of Scene: Switch to enter/exit your map, and the old First Person rotation will be retained.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!