@vaguevoid/fiasco / math/coordinates / worldPosition
Function: worldPosition()
worldPosition(
localToWorld
):Vec2
Defined in: src/math/coordinates.ts:181
Returns the world-space position of the entity associated with the given LocalToWorld
component.
ts
import { Coords, LocalToWorld, Query } from '@vaguevoid/fiasco'
function system(locals: Query<[LocalToWorld]>) {
for (const [local] of locals) {
const worldPosition = Coords.worldPosition(local.matrix)
}
}