In the above code, I am trying to save the initial position of an entity in initialize. In another script I am moving the same entity.
In the above log the value of InitialPos variable is changing continuously which was actually assigned only once in the initialize function.
So I am rather confused on what mistake I am doing here.
Would be great if anybody could help me out.
But in API Reference thay mentioned that getPosition() returns value
getPosition()
Get the world space position for the specified GraphNode. The value returned by this function should be considered read-only. In order to set the world-space position of the graph node, use pc.GraphNode#setPosition.