I’ve been messing around with this for a while and I’m stuck/lost in the many possibilities.
I’ve been playing with a tank model and pretty easily had it rotate locally when the mouse pointer is to the left or right of center screen. What I’d like to do is have the turret rotate AND the mouse pointer move toward center screen so that the turret doesn’t rotate endlessly.
I’ve found some examples that seem to half-work and have lots of jitters (perhaps its something to do with older versions of unity?).
I don’t necessarily need the entire thing written for me, just point me at appropriate methods.
For instance, while looking for a method to rotate the turret on its local axis and found a gazillion non-working examples. Eventually I found out that transform.rotate() defaults to local rotation and you have to actually specify world space if you don’t want local - very simple really but difficult to find in googleland.