[2.0.60] Game freezes when teleporting player to non colliding position
Posted: Mon Aug 25, 2025 5:48 pm
What did you do?
I'm making a Warptorio-style mod where the player can teleport between surfaces. I've used surface.find_non_colliding_position to decide where to place the player and using player.teleport to teleport them there.
What happened?
The game freezes.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
The player should teleport to a non-colliding-position, OR, nothing should happen (function returns false), OR, the game throws a script error due to some failure on my part.
Does it happen always, once, or sometimes?
Always.
This involves one mod not currently on the portal, so kindly see attached. To reproduce just start a new game with that mod (all dependencies are on the portal), click on the console, and try to teleport to ground. I'm sure this is caused by me doing something dumb, but I'd expect a coherent error in that case, rather than a game freeze.
I'm making a Warptorio-style mod where the player can teleport between surfaces. I've used surface.find_non_colliding_position to decide where to place the player and using player.teleport to teleport them there.
What happened?
The game freezes.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
The player should teleport to a non-colliding-position, OR, nothing should happen (function returns false), OR, the game throws a script error due to some failure on my part.
Does it happen always, once, or sometimes?
Always.
This involves one mod not currently on the portal, so kindly see attached. To reproduce just start a new game with that mod (all dependencies are on the portal), click on the console, and try to teleport to ground. I'm sure this is caused by me doing something dumb, but I'd expect a coherent error in that case, rather than a game freeze.