Hello!
I am a hobbyist that picked up Heaps in order to learn something new (and hopefully to make a game from); but, as I have bee messing around and learning the 2d framework I noticed that the h2d.Object class had this function
/**
Move the object by the specied amount along its current direction (rotation angle).
**/
public function move( dx : Float, dy : Float ) {
x += dx * Math.cos(rotation);
y += dy * Math.sin(rotation);
}
I extend the Object class to a parent grid class with blocks of tiles; but they can only move on the x axis since my rotation is 0.
I am curious as to why it requires a rotation to move across the y axis?
Thanks!