Need help rotating 2d sprite

hey thanks for the response adding constraints didn’t seem to do anything :confused:

hey thanks for the response adding constraints didn’t seem to do anything :confused:

Alright I’ll try that thanks for the all the help

So I’ve tried finding different ways of calculating it but can’t seem to get it to work how would you go about doing this?

Hi am trying to get a 2d sprite to rotate left or right by following the mouse cursor. At the moment it follows the mouse’s exact position in full 360. So this leads to some weird visual glitches. Ty for any help -cheers.

also found a new problem my mouse controls only work on my 2d example map and none of my other levels

I think it’s because your 2d example map has a plane in the background and your mouse cursor is hitting this wall. The first thing that came up with my mind is making an invisible plane and put it where the player is moving.

okay I"ll try that ty for the help

So I’ve setup an invisible plain for my character and it’s working fine but it’s still moving in a 360 motion and constraints didn’t seem to affect anything

The other option in my mind is saving the viewport size, getting the mouse position and calculate it directly.