The Offset of a mesh determines the distance from the
BasePart/Position of a
BasePart that the mesh will be displayed.
How to use mesh offset
The Offset property changes the relative position the mesh will be rendered at. For example, an offset of 0, 5, 0 will cause the mesh to be displayed 5 studs above the position of the
The position of the
BasePart remains unchanged, meaning the physics collision box of the part will remain in the same location. This is demonstrated in the image below where the green outline (a
SelectionBox) shows the extents of the
Other uses for mesh offset
There are a number of interesting uses for the mesh offset property.
- Offset and
DataModelMesh/Scalecan be animated using
TweenServicerelatively inexpensively as the engine does not need to make any physics/collision calculations as the
BasePartis not moved.
- Changing the relationship between the mesh and its collision extents (determined by the
Mesh Offset and Scale
In this code sample a
BasePart is instanced with a
DataModelMesh/Offset properties of the
SpecialMesh are then animated using