Hello,
I’m not sure this is possible within Ork, but I thought I’d ask. I’m using a floating origin solution for my game. This introduces some challenges with the loading of a save game as the vector won’t be correct for the position of the game world. I need a way of storing the correct location so I can call it and move the player. One potential way I thought of doing is to somehow get and store the vector of the player relative to a reference object that moves with the rest of the level. For example, I have an empty object placed at 0,0,0 can I somehow get the vector position of the player relative to that object rather than the current position of the player. As the empty object will move with the scene this would in theory give me the correct position to respawn my player. Is that possible?
  • edited January 2022
    If I can call a single axis vector at a time and save them as separate values, I can calculate it. Can the x and z be stored separately?
    Post edited by cookereptiles on
  • edited January 2022
    Hm, you could store the player's position into a global Vector3 variable (e.g. using a regularly running global event).

    For loading, you can also use a global event - using the Scene event type and Load Game scene change type. Here you can get the position out of the global Vector3 variable and restore the position.

    Alternatively, you can also use custom save data, e.g. via custom component save data (component on the combatant's game object) or general custom save data.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks, tricky one this
Sign In or Register to comment.