Can somebody tell me how to rotate the player and enemy
- when i press the left button the player flip his face and when i get close to the enemy the enemy flip the face to the player
I’m using cocos creator 2.4
Can somebody tell me how to rotate the player and enemy
You need this API
https://docs.cocos.com/creator/api/en/classes/Node.html#lookat
Of course, I will also provide a demo, but this demo is written using creator 3.1.1.
https://download.cocos.org/CocosTest/muxiandong/demo/demo-ui-v3.1.1.zip
i’m only need player move left or right , do you have solution
https://download.cocos.org/CocosTest/muxiandong/demo/demo-ui-v3.1.1.zip
Sorry, I gave the wrong link