sm.portal.findBestPortalToWorld

Finds the portal position that has the best path to the given world.

Kind: Function

Environments: Game

Game

sm.portal.findBestPortalToWorld( playerWorld, targetWorld, fromPosition )

Open the full Game reference

Parameters:

Name Type Description
playerWorld integer The player's current world id.
targetWorld integer The world id we wanna get a path towards.
fromPosition Vec3 The position we wanna get a path from.

Returns:

Type Description
Vec3
Portal
The position of the portal, and the portal with the shortest path to the given world.