Orientation Sprite

Hi, is it possible orientate a sprite to a direction? (for a arrow :slight_smile: )
many thanks in advance!

Stefano

Just simple rotation should work. If you are talking about the math to find the angle, just follow some trigonometry.

You can take a look into the API (https://docs.cocos2d-x.org/creator/api/en/?q=rotate). Maybe you can manage it by these comands:

var rotateTo = cc.rotateTo(2, 61.0);
var rotateBy = cc.rotateBy(2, 360);

Or you can open example projects which contains rotation actions, where you can find these specific commands

Thanks for help!! I have found the trouble in my code :slight_smile: