##### Views

- Page
- Discussion
- View source
- History

# Body:getLocalVector

Transform a vector from world coordinates to local coordinates.

## Function

### Synopsis

local_x, local_y = Body:getLocalVector( world_x, world_y )

### Arguments

`number world_x`
  The vector x component in world coordinates.
`number world_y`
  The vector y component in world coordinates.

### Returns

`number local_x`
  The vector x component in local coordinates.
`number local_y`
  The vector y component in local coordinates.

## See Also

- Body

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/Body:getLocalVector"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties