This tutorial explains how you can deal with the aesthetical issues associated with a SC2 Mouse-Look camera. Namely: Restrainting pitch, making a camera follow a unit properly, and disabling/editing mouse-wheel zoom levels.
This tutorial does not teach you how to make a WASD system or anything, though. It's assumed you are familiar with the different camera properties. If not, it's easy to create and play around with a camera in the Galaxy Editor's Camera Layer to get a feeling for what the properties do individually.
Go ahead, make yourself a really good camera that you like for a third person camera... In the Camera Layer. Click Create Camera, double click the
camera object, or right click and select -> Properties, go crazy!
When you're done, let's get the basics up. Go to the trigger editor and create a trigger with event map initialization or whatever you like.
Add the following actions:
Camera - Apply (Your Camera) for player 1 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
Camera - Turn camera mouse rotation On for player 1 (How do you make line breaks in this forum?)
Camera - Lock camera mouse relative mode On for player 1
Camera - Follow for player 1 (Unit group(Your unit)) with the camera and Clear current target
Camera - Turn camera height displacement Off for player 1
Right. If you go ahead and test your map right now, you might notice at least 3 big problems :
1) Your camera is restraintless. It can go upside down, and underground when you move your mouse vertically.
2) When you order your unit to move somewhere (or move via a WASD system), the camera can't keep up! It trails behind like an old granny.
3) If you accidentally turn the mouse-wheel just a bit, your camera settings are ruined! For the rest of the map if the creator hasn't either "fixed it" with a periodic trigger, or done what I'm doing in this tutorial.
I will explain how to solve all these issue within the data editor. No need for a periodic trigger to force the desired camera on all the time. Open up your camera object, and open up notepad so you can write down your desired camera properties. We will need to move them to the data editor later.
MODIFY PITCH MAXIMUM AND MINIMUM ANGLES
We go to the Data Editor, and enter the Cameras tab. In here we will do everything from this point on.
Either duplicate Default Camera and name it something new, or just edit the Default Camera directly.
Topmost we have three values for Angle of Attack (AKA pitch). Set "Angle of Attack Maximum" and "Angle of Attack Minimum" to what you like. They are self-explanatory: Maximum is the maximum pitch, minimum is the minimum pitch. But those settings do not normally work very well. I will show you further down how to make them more strict.
I don't know what "Angle of Attack Increment" exactly does. Increment sounds like it might be some acceleration or what? But my guess is probably worse than yours. Just a shot into the mist.
Find the "Parameter Smooth" field and modify the value. You will see a window containing a list of the various camera properties. These are settings for
smoothing. The slow smoothing is what enables you to tilt your mouse-look camera upside down. That's why we're gonna edit the smoothing for Angle of Attack.
Select the "Angle of Attack" item on the list. Change "Smooth Time Maximum" and "Smooth Time Minimum" to something much lower than the default 2.0 and 0.25. I have set my "Smooth Time Maximum" to 0.1, and my Minimum to 0.02.
Set any of the two above values too low (both to 0.0 for instance), and you'll get a really choppy camera. So if you're smart, don't. The settings we just set greatly improve the speed at which the camera adjusts to the minimum and maximum angle of attack fields I showed you earlier. With these settings, my camera never goes upside down. Yay!
Find the "Target Smooth" field further down. Modify the value. You will see a window containing 4 settings. These values by default cause your camera to trail behind a unit it is following via the "Follow unit group" trigger action. We can change that.
Change "Smooth Time Maximum" to something way lower than 2.0, like 0.05. Change "Smooth TIme Minimum" to something way lower. You might choose the same value again (0.05). In the screenshot (link below), I've set Velocity Maximum to 75, but I later found out it's just fine at 10. I haven't noticed any difference.
This can be done easy. Find "Zoom Levels" and modify the field. This is when you need your open notepad. Did you write down your camera properties? Good.
You will see a window with 5 different zoom levels by default. These are the settings the camera move between when you touch the mouse-wheel or use page up/page down. You can simply select the topmost zoom level and hit the red "X" until the list only contains a single zoom level.
To add new zoom levels, click the green "X".
Then set the parameters to your liking. To apply a change, select a Parameter in the Parameters list below the Zoom Levels, and check Enabled. Then double click the value column in the enabled rows and apply a new value. You can see some of my settings in the screenshot.
I chose to have a simply zoom with 6 levels set to Height Offsets from 1.3 down to 1.0. But if you just want a completely fixed camera disallowing zoom, use a single Zoom Level.
If you have made a new camera (by duplicating default, presumably) you must go to the "Terrain Texture Sets" tab now. There you should find the texture set for the map and set the field Camera to your new camera. Otherwise, you don't need to do this step.
Now, test your map and see if you like it or not. If not, try playing around some more with the fields I pointed out in the Data Editor.
That's it.
I hope this tutorial was comprehensive. If there is anything I missed or something you would add, or a question for that matter, feel free.
Edit: I've noticed that if you rotate your camera way down, pushing against the limit for awhile, it can sometimes leap instantly to the maximum angle of attack all of a sudden. I hope I'll find out how to prevent that.
The tutorial is found 2 posts down. This top post was a mistake. (it's my first tutorial and I'm new here. Something was bound to fail.)
@HuggetSukker: Go
Yes, post away :)
CUSTOMIZING YOUR MOUSE-LOOK CAMERA
This tutorial explains how you can deal with the aesthetical issues associated with a SC2 Mouse-Look camera. Namely: Restrainting pitch, making a camera follow a unit properly, and disabling/editing mouse-wheel zoom levels. This tutorial does not teach you how to make a WASD system or anything, though. It's assumed you are familiar with the different camera properties. If not, it's easy to create and play around with a camera in the Galaxy Editor's Camera Layer to get a feeling for what the properties do individually.
Go ahead, make yourself a really good camera that you like for a third person camera... In the Camera Layer. Click Create Camera, double click the camera object, or right click and select -> Properties, go crazy!
When you're done, let's get the basics up. Go to the trigger editor and create a trigger with event map initialization or whatever you like. Add the following actions:
Camera - Apply (Your Camera) for player 1 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
Camera - Turn camera mouse rotation On for player 1 (How do you make line breaks in this forum?)
Camera - Lock camera mouse relative mode On for player 1
Camera - Follow for player 1 (Unit group(Your unit)) with the camera and Clear current target
Camera - Turn camera height displacement Off for player 1
Unit Selection - Select (Your Unit) for player 1
http://www.sc2mapster.com/media/attachments/18/717/Trigger.GIF
Right. If you go ahead and test your map right now, you might notice at least 3 big problems :
1) Your camera is restraintless. It can go upside down, and underground when you move your mouse vertically.
2) When you order your unit to move somewhere (or move via a WASD system), the camera can't keep up! It trails behind like an old granny.
3) If you accidentally turn the mouse-wheel just a bit, your camera settings are ruined! For the rest of the map if the creator hasn't either "fixed it" with a periodic trigger, or done what I'm doing in this tutorial.
I will explain how to solve all these issue within the data editor. No need for a periodic trigger to force the desired camera on all the time. Open up your camera object, and open up notepad so you can write down your desired camera properties. We will need to move them to the data editor later.
MODIFY PITCH MAXIMUM AND MINIMUM ANGLES
We go to the Data Editor, and enter the Cameras tab. In here we will do everything from this point on. Either duplicate Default Camera and name it something new, or just edit the Default Camera directly.
Topmost we have three values for Angle of Attack (AKA pitch). Set "Angle of Attack Maximum" and "Angle of Attack Minimum" to what you like. They are self-explanatory: Maximum is the maximum pitch, minimum is the minimum pitch. But those settings do not normally work very well. I will show you further down how to make them more strict. I don't know what "Angle of Attack Increment" exactly does. Increment sounds like it might be some acceleration or what? But my guess is probably worse than yours. Just a shot into the mist.
http://www.sc2mapster.com/media/attachments/18/718/Angle_of_Attack_Fields.GIF
SOLVING RESTRAINTLESS PITCH
Find the "Parameter Smooth" field and modify the value. You will see a window containing a list of the various camera properties. These are settings for smoothing. The slow smoothing is what enables you to tilt your mouse-look camera upside down. That's why we're gonna edit the smoothing for Angle of Attack.
Select the "Angle of Attack" item on the list. Change "Smooth Time Maximum" and "Smooth Time Minimum" to something much lower than the default 2.0 and 0.25. I have set my "Smooth Time Maximum" to 0.1, and my Minimum to 0.02.
Set any of the two above values too low (both to 0.0 for instance), and you'll get a really choppy camera. So if you're smart, don't. The settings we just set greatly improve the speed at which the camera adjusts to the minimum and maximum angle of attack fields I showed you earlier. With these settings, my camera never goes upside down. Yay!
http://www.sc2mapster.com/media/attachments/18/719/Parameter_Smooth.GIF
SOLVING CAMERA TRAILING BEHIND UNIT
Find the "Target Smooth" field further down. Modify the value. You will see a window containing 4 settings. These values by default cause your camera to trail behind a unit it is following via the "Follow unit group" trigger action. We can change that.
Change "Smooth Time Maximum" to something way lower than 2.0, like 0.05. Change "Smooth TIme Minimum" to something way lower. You might choose the same value again (0.05). In the screenshot (link below), I've set Velocity Maximum to 75, but I later found out it's just fine at 10. I haven't noticed any difference.
http://www.sc2mapster.com/media/attachments/18/720/Target_Smooth.GIF
SOLVING THE "MOUSE-WHEEL OF DOOM" PROBLEM
This can be done easy. Find "Zoom Levels" and modify the field. This is when you need your open notepad. Did you write down your camera properties? Good.
You will see a window with 5 different zoom levels by default. These are the settings the camera move between when you touch the mouse-wheel or use page up/page down. You can simply select the topmost zoom level and hit the red "X" until the list only contains a single zoom level.
To add new zoom levels, click the green "X".
Then set the parameters to your liking. To apply a change, select a Parameter in the Parameters list below the Zoom Levels, and check Enabled. Then double click the value column in the enabled rows and apply a new value. You can see some of my settings in the screenshot. I chose to have a simply zoom with 6 levels set to Height Offsets from 1.3 down to 1.0. But if you just want a completely fixed camera disallowing zoom, use a single Zoom Level.
A slightly better screenshot: http://www.sc2mapster.com/media/attachments/18/723/Zoom_Levels_2.GIF
If you have made a new camera (by duplicating default, presumably) you must go to the "Terrain Texture Sets" tab now. There you should find the texture set for the map and set the field Camera to your new camera. Otherwise, you don't need to do this step.
Now, test your map and see if you like it or not. If not, try playing around some more with the fields I pointed out in the Data Editor. That's it.
I hope this tutorial was comprehensive. If there is anything I missed or something you would add, or a question for that matter, feel free.
Edit: I've noticed that if you rotate your camera way down, pushing against the limit for awhile, it can sometimes leap instantly to the maximum angle of attack all of a sudden. I hope I'll find out how to prevent that.