Skip to content

Instantly share code, notes, and snippets.

@kirillrybin
Created September 27, 2013 10:51
Show Gist options
  • Save kirillrybin/6726901 to your computer and use it in GitHub Desktop.
Save kirillrybin/6726901 to your computer and use it in GitHub Desktop.
Отображение нормалей вершин
using UnityEngine;
public class NormalsDrawer : MonoBehaviour
{
private Mesh _mesh;
void OnDrawGizmosSelected()
{
_mesh = GetComponent<MeshFilter>().mesh;
for (var i = 0; i < _mesh.vertices.Length; i++)
{
var vertice = _mesh.vertices[i];
Debug.DrawRay(transform.position + vertice, vertice.normalized * 0.1F, Color.green);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment