Skip to content

Instantly share code, notes, and snippets.

@PaperPrototype
Last active February 14, 2021 16:23
Show Gist options
  • Save PaperPrototype/e7ca521f931b8c3dc39631529f2b0b08 to your computer and use it in GitHub Desktop.
Save PaperPrototype/e7ca521f931b8c3dc39631529f2b0b08 to your computer and use it in GitHub Desktop.
// the generic objects struct for static objects in the world (obstactles not moving with physics)
struct Object {
struct Transform transform;
struct Mesh mesh;
struct MeshCollider collider;
}
struct Transform {
// float pos[3] or struct with { x, y, z ... } both work
struct Vector3 pos;
struct Vector4 rot;
struct Vector3 scale;
}
// vectors
struct Vector3 {
float x, y, z;
}
struct Vector4 {
float x, y, z, w;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment