diff --git a/CHANGELOG.md b/CHANGELOG.md index ec78c7fef..6032f594c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.0.1 (December, 3, 2024) +* fix h2d.Object.move method to perform local movement as intended + ## 2.0 (January 1, 2024) * changed h3d.Vector to be a 3 component vector (alias to h3d.col.Point), added h3d.Vector4 diff --git a/h2d/Object.hx b/h2d/Object.hx index 530ba5c28..fb286a87e 100644 --- a/h2d/Object.hx +++ b/h2d/Object.hx @@ -1015,8 +1015,8 @@ class Object #if (domkit && !domkit_heaps) implements domkit.Model # Move the object by the specified amount along its current direction (`Object.rotation` angle). **/ public function move( dx : Float, dy : Float ) { - x += dx * Math.cos(rotation); - y += dy * Math.sin(rotation); + x += dx * Math.cos(rotation) - dy * Math.sin(rotation); + y += dx * Math.sin(rotation) + dy * Math.cos(rotation); } /**