How do I check what shape/type a MeshInstance3D is

Godot Version

4.2.1

Question

Code:

print(_ParentMesh.mesh)
print(_ParentMesh.mesh == BoxMesh)

Console:

<BoxMesh#-9223372001740061384>
false

I can’t figure out why its giving me a false, or is there even a way to check if mesh is a specific type

Use print(_ParentMesh.mesh is BoxMesh).

1 Like

Oml, I always forget about “is”

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.