+1 vote

Hi,
First at all, let me tell you how amazed and happy i am about this engine.
Second, i just get started and I can not access the node mesh instance. What i really want to get is the AABB of the mesh.
So:
- I know that MeshInstance comes from node, but i am unable to cast it from Node -> MeshInstance. If this kind of cast is posible, how we can do this?

  • Is there a Node method that retrieve me the mesh instance or AABB?

  • I do not want to extend from MeshInstance in my script. i need to be extended by Node.

Thank you very much.

in Engine by (45 points)

1 Answer

+3 votes
Best answer

here's easiest way.

add child MeshInstance to your node. and your code will be like this.

var aabb = get_node("myMeshInstance").get_aabb()
by (485 points)
selected by

Yes thats it! Thank you very much!

then, select my answer please ^-^

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.