Rotating an object with mouse

pls, i need help to rotate my scythe to the mouse.

Hi @jus.co_ding_me_23,

Check this example:

i still dont get it @Leonidas, i put the code and it does not work.

this is my game, pls help

If you mean the object doesn’t rotate, I don’t see in your project any code to so. It seems the script is missing:


i removed the script because it was not working

How to add tweet effect to this example,thank you?

What do you mean by a tweet effect?

sonrry,is Smooth rotation

You can do what the orbit camera does on the model viewer which is to lerp to a target rotation which gives you the inertia like effect I think you are asking for. E.g

If there is no user input, you could use the tween.js library