Skip to content

Angles

object Angles
Example
on_npc_option(Assets.Npc.hans.id, "Talk-to") { player ->
val from = target.tile4.tile
val to = player.tile4.tile
Angles.facing(from.x, from.z, to.x, to.z)?.let { target.getComponent<Position>().facingAngle = it }
}
fun facing(
fromX: Int,
fromZ: Int,
toX: Int,
toZ: Int
): Int?