broken lighting

This commit is contained in:
2020-06-28 21:20:26 +02:00
parent 419a329fc8
commit f868a8e45a
7 changed files with 68 additions and 15 deletions

View File

@@ -13,10 +13,10 @@ impl GameObject {
GameObject { mesh_index: mesh, texture_index, model_matrix: Matrix4::identity() }
}
pub fn set_position(&mut self, x: f32, y: f32, z: f32) {
self.model_matrix.w.x = x;
self.model_matrix.w.y = y;
self.model_matrix.w.z = z;
pub fn set_position(&mut self, pos: (f32, f32, f32)) {
self.model_matrix.w.x = pos.0;
self.model_matrix.w.y = pos.1;
self.model_matrix.w.z = pos.2;
}
pub fn get_position(&self) -> Vector3<f32> {