[SOLVED] Sphere not rotating on mouse click

https://playcanvas.com/editor/scene/1458391
I’m not sure what the problem is because it doesn’t give any errors.

Hello @MoonAlien822,

I was confused at first since your code seems correct. Then I noticed that the script attached to the entity (rotate) has a different name than the one in the assets folder (mouse). I guess you changed the name of the script after you created it.

To fix the issue, you just have to click the script from the assets folder and on the right side press parse (you may need to press it a couple of times) until you see the name to change from rotate → mouse

Then you need to delete that script from the entity and re attach it

5 Likes

thank you very much!

1 Like