Skip to content

FitMesh

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
Blitz3D

FitMesh

FitMesh:Void mesh:Int32, x:Float32, y:Float32, z:Float32, width:Float32, height:Float32, depth:Float32, uniform:Int32=0
Parameter Mode Type Default Description
mesh In Int32 required Mesh handle.
x In Float32 required X of the box corner.
y In Float32 required Y of the box corner.
z In Float32 required Z of the box corner.
width In Float32 required Size of the box along X.
height In Float32 required Size of the box along Y.
depth In Float32 required Size of the box along Z.
uniform In Int32 0 1 to scale by the same factor on all axes, 0 to stretch to the box. Defaults to 0.

Description

Scales and moves a mesh so that it exactly fills a box. x, y and z are the corner of the box with the smallest coordinates and width, height and depth are its size. With uniform set to 1 the proportions of the mesh are kept and it is fitted inside the box. Never pass 0 as a size: that squashes the mesh flat and its shape is lost. Use a small value like 0.001 for a flat mesh.

Related Commands

AddMesh, CopyMesh, CreateMesh, FlipMesh, LoadAnimMesh, LoadMesh, PaintMesh, PositionMesh

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally