Skip to content

Instantly share code, notes, and snippets.

@antoinefortin
Created December 13, 2021 05:51
Show Gist options
  • Save antoinefortin/827da9eda0280d79d5abbc7311596fbb to your computer and use it in GitHub Desktop.
Save antoinefortin/827da9eda0280d79d5abbc7311596fbb to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MatricesDemo : MonoBehaviour
{
static Vector4 vert0 = new Vector4(0.0f, 0.0f, 0.0f, 1.0f);
static Vector4 vert1 = new Vector4(10.0f, 0.0f, 0.0f, 1.0f);
static Vector4 vert2 = new Vector4(0.0f, 10.0f, 0.0f, 1.0f);
static Vector4[] listVert = new Vector4[4];
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnDrawGizmosSelected()
{
Gizmos.color = Color.red;
listVert[0] = vert0;
listVert[1] = vert1;
listVert[2] = vert2;
for (int i = 0; i < listVert.Length; i++)
{
Gizmos.DrawCube(listVert[i], new Vector3(1.0f, 1.0f, 1.0f));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment