This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Player { | |
float pos[3]; // array of 3 floats (aka vector3) | |
float rot[4]; // array of 4 floats (aka vector4, aka quaternion) | |
struct Mesh mesh; // if you are in third person u should see your player | |
struct BoxCollider collider; // collision | |
} |
NewerOlder