apply-conventionslisted
Install: claude install-skill playcanvas/skills
# Engine conventions
Read `package.json` and the installed `playcanvas` source before relying on version-sensitive API
details. Apply these stable conventions throughout the project.
## Coordinates and angles
- Use the right-handed coordinate system: +Y is up and the gameplay ground plane is XZ.
- Treat `entity.forward` and the camera viewing direction as -Z; `entity.right` is +X and
`entity.up` is +Y. `lookAt` points -Z at the target.
- Expect glTF models authored toward +Z to need a yaw correction. Inspect and calibrate each
directional model instead of applying one global correction.
- Pass degrees in XYZ order to high-level angle APIs.
- Keep pitch, yaw, and roll as application state. Do not repeatedly read `getEulerAngles()` and
feed its decomposition back into `setEulerAngles()`.
- Interpolate periodic angles with `math.lerpAngle()` or rotations with `Quat.slerp()`, not scalar
lerp across the 0/360 seam.
## Transforms and units
- Use `setPosition`, `setRotation`, and `setEulerAngles` for world transforms.
- Use the `setLocal*` variants below a parent.
- Treat units as metres. Physics gravity defaults to `(0, -9.81, 0)`.
- Keep gameplay transforms on a semantic root and asset-authoring corrections on a child.
- Do not scale rigid-body roots or skinned bones.
## Cameras, materials, and bounds
- Perspective camera FOV is vertical and defaults to 45 degrees.
- Smooth an orbit camera's focus, yaw, pitch, and distance, then derive its position. Do not
`Vec3.l