Myvideo

Guest

Login

How to draw a cube in Unity with Mesh Renderer (Featuring a sphere)

Uploaded By: Myvideo
19 views
0
0 votes
0

using c# and vector math. In this video I procedurally generate a cube mesh of desired size and resolution by manipulating a plane mesh in 6 different ways. I also show how I can turn this cube into a sphere by manipulating the vertices. As an extra I do some linear interpolation between both sets of values to morph between cube and sphere as desired. While it gets the job done, the downside to this approach is that there are some repeated vectors on the edges of the planes, which can make it confusing to alter since moving a vertex might not change all triangles visually connected to that point since they may be connected to another point at the same position instead. Disclaimer: this is just one way to draw a cube. I am hoping to explore other ways to draw a cube in the future while exploring mesh world and 3d rotations. Plane mesh generation tutorial: Mesh Renderer playlist that builds up to this:

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later