API

Display Axes

Axes

It is often useful to be able to quickly display world and local axes to see position and rotation, for example. For world axes, use

import { AxesViewer } from "@babylonjs/core/Debug/axesViewer";
const axes = new AxesViewer(scene, length_of_axes);

To make any of the x, y, and z axes local to a mesh (or other appropriate object), use

axes.xAxis.parent = mesh;
axes.yAxis.parent = mesh;
axes.zAxis.parent = mesh;
AxesViewer

You can customise the axes, which do not have to be orthogonal, using

axes.update(position, xAxis, yAxis, zAxis) //all parameters are Vector3s
Update AxesViewer

Further reading