Hello all.
I’m making a game on Mac and I have just tried it out on Windows for the first time and found one aspect to behave VERY differently between the platforms.
In my game the player can go in to “transfer mode” where if they bump in to an enemy they attach themselves to the enemy. During the attachment process, the player moves on top of the enemy. I have achieved this by setting the timeScale to 0, using this line…
transform.position = Vector2.MoveTowards(transform.position, TransferToPosition, 0.0075f);
and when the MoveTowards is complete, setting the timeScale back to 1.
On my Mac the game freezes whilst the player takes about a second and a half to move in to position and then everything resumes as normal. This is working as intended. On a PC, however, the transfer happens in a split second.
Is my line of code wrong, or should I be using another method? The code must go in the Update section as the game has to be at timeScale = 0 whilst the transfer happens. If timeScale is not zero then other aspects of the game won’t make sense.
Can anyone please help me? Thank you in advance.