Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Simpsons Hit & Run Multiplayer Server
  • Lua API Reference
  • Engine Functions

Engine.VectorUtil

Available since Version 1.0.

The Engine.VectorUtil table provides utility functions for working with vectors.

Variables

This table does not have any variables.

Methods

Function Name Description
Engine.VectorUtil.GetDistance2D Returns the distance between two points in 2D space.
Engine.VectorUtil.WithinDistance Returns true if the distance between two points is less than or equal to a specified distance.
Engine.VectorUtil.InSphere Returns true if a point is inside a sphere.
Engine.VectorUtil.InCircle Returns true if a point is inside a circle.
Engine.VectorUtil.InBox Returns true if a point is inside a box.
Engine.VectorUtil.InArea Returns true if a point is inside a specified area.