1 decade ago by dariusk
Hi Dominic,
It took me a few minutes of inspecting the entity in my debugger to figure out that if I want to flip the current animation horizontally in an entity I need to do:
this.currentAnim.flip.x = true;
The property is mentioned in the Animation Class Reference:
http://impactjs.com/documentation/class-reference/animation
But what isn't completely clear is that this.currentAnim is an Animation object, thus containing those flip variables I wanted. If you could add a note about this to the .currentAnim portion of the Entity documentation, that would probably save some trouble for a few people.
http://impactjs.com/documentation/class-reference/entity#currentanim
Thanks!
It took me a few minutes of inspecting the entity in my debugger to figure out that if I want to flip the current animation horizontally in an entity I need to do:
this.currentAnim.flip.x = true;
The property is mentioned in the Animation Class Reference:
http://impactjs.com/documentation/class-reference/animation
But what isn't completely clear is that this.currentAnim is an Animation object, thus containing those flip variables I wanted. If you could add a note about this to the .currentAnim portion of the Entity documentation, that would probably save some trouble for a few people.
http://impactjs.com/documentation/class-reference/entity#currentanim
Thanks!