summaryrefslogtreecommitdiff
path: root/engine/src/object.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/object.rs')
-rw-r--r--engine/src/object.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/src/object.rs b/engine/src/object.rs
index 4112bcb..3827763 100644
--- a/engine/src/object.rs
+++ b/engine/src/object.rs
@@ -42,17 +42,18 @@ impl Object
#[must_use]
pub fn position(&self) -> &Vec3<f32>
{
- self.transform.translation()
+ self.transform.position()
}
pub fn translate(&mut self, translation: Vec3<f32>)
{
- self.transform.set_translation(translation);
+ self.transform
+ .set_position(self.transform.position().clone() + translation);
}
pub fn scale(&mut self, scaling: Vec3<f32>)
{
- self.transform.set_scaling(scaling);
+ self.transform.set_scale(scaling);
}
#[must_use]