R
R
Roman Koff2020-08-20 13:58:55
C++ / C#
Roman Koff, 2020-08-20 13:58:55

How to draw a pyramid in Unity 3D?

How to form a pyramid from polygons on the current scene, using C# code, so that there are no gaps between edges and vertices?

For example, there are four points in space. It is necessary to build a three-dimensional figure on them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-08-20
@Zarinov

The mesh consists of two components: 1) coordinates of the vertices (Vertex buffer) 2) numbers of vertices from which the triangle is obtained (Index buffer).
You need to calculate the coordinates of the vertices of your pyramid and assemble the faces one by one from them. These two buffers are the basis of the mesh.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question