Skip to content

Instantly share code, notes, and snippets.

@PaperPrototype
Last active February 7, 2021 18:38
Show Gist options
  • Save PaperPrototype/288109497b1ba36182c4844f2b172979 to your computer and use it in GitHub Desktop.
Save PaperPrototype/288109497b1ba36182c4844f2b172979 to your computer and use it in GitHub Desktop.
Player "components"
struct Mesh {
int meshIndex; // the number of vertices or "size" of the mesh
float vertices[meshIndex][3]; // array of 3 dimensional floats
float normals[meshIndex][3]; // surface normals
float uvs[meshIndex][2]; // 2 dimensional floats, maps a pixel position on the texture to the corresponding vertex
int triangles[meshIndex]; // in sets of 3 gets vetices by index to make triangles bewteen the 3 vertices
}
struct BoxCollider {
float height, width, depth;
}
struct Pos {
float x, y, z;
}
struct Rot {
float x, y, z, w;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment