summaryrefslogtreecommitdiff
path: root/scene/resources/multimesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/multimesh.cpp')
-rw-r--r--scene/resources/multimesh.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 7084c3b4e1..1b406551ab 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -166,11 +166,22 @@ void MultiMesh::set_instance_transform(int p_instance, const Transform &p_transf
VisualServer::get_singleton()->multimesh_instance_set_transform(multimesh, p_instance, p_transform);
}
+
+void MultiMesh::set_instance_transform_2d(int p_instance, const Transform2D &p_transform) {
+
+ VisualServer::get_singleton()->multimesh_instance_set_transform_2d(multimesh, p_instance, p_transform);
+}
+
Transform MultiMesh::get_instance_transform(int p_instance) const {
return VisualServer::get_singleton()->multimesh_instance_get_transform(multimesh, p_instance);
}
+Transform2D MultiMesh::get_instance_transform_2d(int p_instance) const {
+
+ return VisualServer::get_singleton()->multimesh_instance_get_transform_2d(multimesh, p_instance);
+}
+
void MultiMesh::set_instance_color(int p_instance, const Color &p_color) {
VisualServer::get_singleton()->multimesh_instance_set_color(multimesh, p_instance, p_color);
@@ -245,7 +256,9 @@ void MultiMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_instance_count", "count"), &MultiMesh::set_instance_count);
ClassDB::bind_method(D_METHOD("get_instance_count"), &MultiMesh::get_instance_count);
ClassDB::bind_method(D_METHOD("set_instance_transform", "instance", "transform"), &MultiMesh::set_instance_transform);
+ ClassDB::bind_method(D_METHOD("set_instance_transform_2d", "instance", "transform"), &MultiMesh::set_instance_transform_2d);
ClassDB::bind_method(D_METHOD("get_instance_transform", "instance"), &MultiMesh::get_instance_transform);
+ ClassDB::bind_method(D_METHOD("get_instance_transform_2d", "instance"), &MultiMesh::get_instance_transform_2d);
ClassDB::bind_method(D_METHOD("set_instance_color", "instance", "color"), &MultiMesh::set_instance_color);
ClassDB::bind_method(D_METHOD("get_instance_color", "instance"), &MultiMesh::get_instance_color);
ClassDB::bind_method(D_METHOD("set_instance_custom_data", "instance", "custom_data"), &MultiMesh::set_instance_custom_data);