Actor > Tweening > rotation

Introduction
Each of us is facing different direction in the world so does many vehicles in the real wirld heading to various locations. And also in top-down games, turret guns do rotate to shoot enemies so does the player and its guns to shoot enemies. 

it has also been used in our so-called endless scene https://stencyl-nator.blogspot.com/p/endless-scenes.html to remove repitition. 

Note. 

Snippet

Previrew code in ;design mode
actor.spinTo(90, 0, Easing.linear);

computational shortcut
actor.tweenProps.angle.tween(actor.getAngleInDegrees(), 90, Easing.linear,0);

No comments:

Post a Comment