Help with Mouse Look Script

Hiya,

Sorry, I do not really understand scripting or programming (just learning some). I was wondering if someone could help me know how to change the Mouse Look Script section below so that holding down the right mouse button will allow camera look to change direction and the Mouse Wheel zooms in and out.

I really don’t want to be looking around contantly when I move the mouse within the game window.

Of course any ideas anyone has about how to do this better, I am open to that too. :smile:

Thanks in advance,

A

What do you need exactly?

Bikebreck

Hi Bike,

Actually some help with a script for Mouse Look that allows me to lock the view to just the RMB only and MMB as zoom. This way when I am looking in the game window, my view isn’t constantly looking around every time I move my mouse.

I hope that makes sense.

Thanks,

A

UPDATE: I have decided to follow this thread: http://forum.unity3d.com/threads/16949-WOW-Camera-Movement?

It looks like it might give me what I am looking for. Right now, I am in a 1st person view, but that thread might give me some hints.

A

http://forum.unity3d.com/threads/84072-Better-MouseOrbit-required-for-newbee?p=540208&viewfull=1#post540208

Thanks B,

I will check that out and let you know how I do. :slight_smile:

Now, is this a js or C# script? Sorry, but I am not a programmer.

Best,

A

JavaScript

The easiest way to tell is the use of the word “var” short for variable. C# declares variables by type first

// .js
var myPosition : Vector3;

// .cs
Vector3 myPosition;

Thanks B. Pretty simple. :smile:

A

Actually, that doesn’t distinguish C# and UnityScript (C# has a ‘var’ keyword that’s used in a somewhat similar way, although in C# it’s simply a compile-time shortcut).

The overall syntax for declaring variables does of course differ between the two languages though.