Unity click and drag script to rotate camera

Just googling around to find how to rotate camera with mouse click and drag. Thanks to this link: https://answers.unity.com/questions/1189946/click-and-drag-to-rotate-camera-like-a-pan.html

This code is originally taken from that link:

Then I made a slight changes to clamp vertical camera rotation:

 

Getting boored? Why not playing a game?

Power Block

Tiki Solitaire

Pet Connect

Cake Shop

Jewels Blitz 3

Forest Match

Bike Racing

Aquador

Solitaire Swift

Bubble Shooter Classic HD

Black and white snake

Leave a Reply

Your email address will not be published. Required fields are marked *