diff options
Diffstat (limited to 'engine/src/object.rs')
-rw-r--r-- | engine/src/object.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/src/object.rs b/engine/src/object.rs index 02ae97a..9952c5f 100644 --- a/engine/src/object.rs +++ b/engine/src/object.rs @@ -76,6 +76,12 @@ impl Object self.id } + #[must_use] + pub fn position(&self) -> &Vec3<f32> + { + self.transform.translation() + } + pub fn translate(&mut self, translation: Vec3<f32>) { self.transform.set_translation(translation); |