b2dMeshFaceCorners

Category: 2D Overlay

Syntax:

b2dMeshFaceCorners:Int(handle:Int, face:Int)


Parameters

Returns

3 or 4



Summary

How many corners the face has: 3 for a triangle, 4 for a quad. A triangle's fourth corner repeats its third, so every face can be drawn as a quad without a special case.

Faces do not change as a mesh animates — read them once after loading and keep them in arrays. An unknown handle or face returns 0.

View detailed documentation online



Example
Print b2dMeshFaceCorners(mesh, 0)

See examples/Runtime/30 - Meshes.


BambooBasic © 2026 Michael Denathorn