How to rotate the 3D Object

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

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


i can’t find the file you sent

https://download.cocos.org/CocosTest/muxiandong/demo/demo-ui-v3.1.1.zip

Sorry, I gave the wrong link