⚠ Preview docs — built from the develop branch and may be unstable. Go to the stable docs.

SpatialEntity.TryGetMesh

bool TryGetMesh(Mesh mesh, Pose& origin)

The entity’s 3D mesh! Mesh vertices are relative to the origin pose, which the system keeps aligned with the physical world, so draw the mesh at origin each frame. Filling the Mesh is the expensive path, so pass a null mesh to fetch just the current origin, and refill only when Changed flags the Mesh component.

   
Mesh mesh A valid Mesh to fill with the entity’s geometry, or null to only retrieve the origin pose.
Pose& origin Pose the mesh’s vertices are relative to.
RETURNS: bool False if this entity has no mesh component.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!