I’m having a hell of a time with scene changing since upgrading to a new computer. The new computer is substantially quicker then my previous and as a result has introduced some odd behaviors with Astar.
I set the following just as async.done = true in my scene change:
destinationPosition = loadPosition;
transform.position = loadPosition;
but the character flips back to zero on the transforms and falls. I can at runtime move my character but I need to disable AIPath in order to do it. However with boot this does not seem to work and AIpath seems to run a new location shortly after running my code. I’ve checked but I can’t seem to find anything in my code that would result in this.
I’ve had a tremendous amount of difficulty with this over the years and it’s always with scene changes. I wish there was a simplistic approach to this.
Edit. It seems that AIpath is running a new location as a result of the quicker speed on my computer. If I alt tab the game on load it slows down astar and it’s able to properly run the teleport sequence. Same thing with runtime. If I swap to game and editor on two windows teleport works, yet if game window is docked all on one monitor Aipath runs quicker and misses it’s teleport.
I’ve got it to work by disabling AIpath on my prefabs, but when I code them to enable they do not operate and the characters are still. If I enable them in the editor manually they work. How come the editor has a different result then in code?