Currently I’m using these two function to update the character’s position and it works well, the problem is when I call the MovementUpdate() it will get position by simulatedPosition = tr.position, and when I call FinalizeMovement() it will set transform.position.
recently I need to draw the character via Graphics.DrawMesh() and I’d like to avoid to access the transform.position since updating this field is useless and I will store this Vector3 in my own csharp class.
What I want to do is still I call these two function to calculate the nextPosition that I will store into my own class but I have no idea how to pass the current character position to MovementUpdate(). is it possible?
MovementUpdate(1, out var nextPosition, out var nextRotation);
FinalizeMovement(nextPosition, nextRotation);