diff options
Diffstat (limited to 'src/maths/primitives.c')
-rw-r--r-- | src/maths/primitives.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/maths/primitives.c b/src/maths/primitives.c index 04977a6..233a7e0 100644 --- a/src/maths/primitives.c +++ b/src/maths/primitives.c @@ -117,6 +117,9 @@ Geometry Geo_CreateCuboid(f32x3 extents) { for (u32 i = 0; i < vertices->len; i++) { u32_darray_push(indices, i); + vertices->data[i].static_3d.position = + vec3_sub(vertices->data[i].static_3d.position, + vec3(0.5, 0.5, 0.5)); // make center of the cube is the origin of mesh space } Geometry geo = { |