Align
The Align
component is a simple container that positions an entity relative to it’s parent. This can be useful when using 3D assets that are offset from the origin. Sometimes, you just want to sit the asset on the ground, or align it with the camera.
The Align
component accepts the following props top
| bottom
| left
| right
| front
| back
.
Usage
This example will align the asset to the bottom right of the parent entity.
import { Align } from '@playcanvas/react/components'
<Entity>
<Align bottom right>
<Render type="asset" asset={asset} />
</Align>
</Entity>
Last updated on