pathfindingMode() Function Reference

pathfindingMode(integer mode)

Changes the pathfinding mode. Currently two modes are supported:

pathfindingMode(1) means that tiles can be traversed in any direction by default. Call disablePath() to disable a particular direction for a particular tile. This is the default mode.

pathfindingMode(2) means that tiles cannot be traversed in any direction by default. Call enablePath() to enable a particular direction for a particular tile.

Changing modes resets all tiles so you should do this before calling loadTiledMap() if you're using Tiled to set pathfinding properties.


	local qiso = require "plugin.qisoengine"
	qiso.setAssetsFolder("assets")
	qiso.pathfindingMode(2)
	qiso.loadTiledMap("sample-tilemap")

	-- Enable camera panning when the screen is dragged
	qiso.enableCameraPan()

	-- Enable the main Qiso loop to render/update our world
	qiso.activate()