Table of Contents

Class BoxMesh

Namespace
Godot
Assembly
GodotSharp.dll

Generate an axis-aligned box PrimitiveMesh.

The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to Vector3(3, 2, 1). This is equivalent to adding UV *= vec2(3.0, 2.0) in a vertex shader.

Note: When using a large textured BoxMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase SubdivideDepth, SubdivideHeight and SubdivideWidth until you no longer notice UV jittering.

public class BoxMesh : PrimitiveMesh, IDisposable
Inheritance
BoxMesh
Implements
Inherited Members

Constructors

BoxMesh()

public BoxMesh()

Properties

Size

The box's width, height and depth.

public Vector3 Size { get; set; }

Property Value

Vector3

SubdivideDepth

Number of extra edge loops inserted along the Z axis.

public int SubdivideDepth { get; set; }

Property Value

int

SubdivideHeight

Number of extra edge loops inserted along the Y axis.

public int SubdivideHeight { get; set; }

Property Value

int

SubdivideWidth

Number of extra edge loops inserted along the X axis.

public int SubdivideWidth { get; set; }

Property Value

int

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool