This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I compared these pages:
http://docs.godotengine.org/en/2.1/classes/class_mesh.html
http://docs.godotengine.org/en/3.0/classes/class_mesh.html

Can anybody explain why so many functions are not there anymore? I want to use the surfacegetmaterial() function, but it doesn't exist in 3.0.

in Engine by (210 points)

2 Answers

+1 vote
Best answer

The methods are still there, they have just been moved to a different class. As you can see on the '3.0' version of the mesh type, there are now two classes inheriting from it, 'ArrayMesh' and 'PrimitiveMesh'. 'Mesh' is now an abstract class. The methods you are looking for are now part of the 'ArrayMesh' type.
It makes more sense logically, this way it is now possible to have multiple different mesh types such as ArrayMesh for imported models etc, PrimitiveMesh for builtin primitive types and possible other future ones with some shared functionality.

TL;DR: The methods are still there, they are now located in the 'ArrayMesh' class.

I hope that I could help you :)

by (305 points)
selected by
+1 vote
by (7,954 points)

But my mesh is not part of a meshinstance. It's a render pass of a particles node. http://docs.godotengine.org/en/3.0/classes/class_particles.html

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 Frequently asked questions and 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 [email protected] with your username.