Hey there! Im making way more progress now with the loading system (still reworking a lot of the classes so its as consistent as possible).
My new doubt is related to the position of an object with a NavMeshAgent: When I do the ES3.Load() on the objects I want to load this particular one "spawns" on what appears to be 0,0,0 instead of the position it was before saving.
The only intertesting difference between this gameobject and the rest is that it has a NavMeshAgent. In fact, it has some behaviour to go and wait on a certain position, and when loading and teleporting to 0,0,0 it will start moving to the posistion it was supposed to be.
Is is possible that some NavMeshAgent behaviour makes these gameobject to rest position? Any advice you could give me here?
Thanks a lot!
NavMeshAgent and position when loading
Re: NavMeshAgent and position when loading
Hi there,
To my knowledge a NavMeshAgent controls the position of the object it's attached to, so trying to move it via it's Transform would be overridden by the NavMeshAgent.
I believe to teleport a NavMeshAgent you would need to use it's Warp() method. However, for specific information on the behaviour of a NavMeshAgent and how to change and restore it's position, I recommend asking on the Unity forums as they will have more information on this.
All the best,
Joel
To my knowledge a NavMeshAgent controls the position of the object it's attached to, so trying to move it via it's Transform would be overridden by the NavMeshAgent.
I believe to teleport a NavMeshAgent you would need to use it's Warp() method. However, for specific information on the behaviour of a NavMeshAgent and how to change and restore it's position, I recommend asking on the Unity forums as they will have more information on this.
All the best,
Joel