- Home /
How to reduce cam speed in the editor?
I find the cam speed in the editor a bit too fast... I'd like to make it 3/4 or 3/5 of what is now. Is it possible?
Answer by Sebas · May 16, 2010 at 02:16 AM
Sorry, I wasn't talking about editor camera, hence the edit. There's no easy way that I know of to change the editor camera's movement.
I suppose if it's very vital to your workflow you could extend your editor and manipulate your scene view camera. If you are within the Editor class, you can use OnSceneGUI() to do stuff to your scene view. I tried something like this to capture input and manipulate the scene camera, but to no avail yet:
@CustomEditor (MoveSceneCam) class MoveSceneCamEditor extends Editor {
function OnSceneGUI () {
if (Event.current.type == EventType.MouseDown) {
Debug.Log(Camera.current.transform.position.x);
}
}
}
You access your scene view camera by using Camera.current. That would be at least a start, but I didn't get it to work yet. Have a look around the forums and script reference for OnSceneGUI() and editor extensions.
I'll give it another go soon.
Thank you, I suspected that... I hope that a script will solve all. Now that we are here, can you tell me how to add a camera to the scene and if it is possible to use that as camera to move in the scene in the editor? If so, maybe I can set camera speed in there?
If you want to use the "scene camera", it is already there by default in a new project. You access this camera by using Camera.current within OnSceneGUI() in a script running in edit mode. You don't have to add any additional cameras to your project to do this.
In this script you could then theoretically set the transform of the scene camera by a keypress. I'll give that a try later today when I have more time.
I didn't know you could do that. Learn something new every time I come here. +1 Sebas.
Thank you Sebas, I guess that will do the trick! I would give you a vote but I can't!
Answer by tangwilliam · Dec 16, 2016 at 11:51 AM
You can both press alt key and right button while move the mouse up or down. This may give you what you want.
That's actually gives you very small step for camera movement.
Wow! I can't believe I barely found out about this. This is so useful! Thanks!
That's not a perfect solution but works great as workaround!
Unity now has a camera speed setting in the latest Unity version(s). See the comments under Eric's answer over here. Quite some time ago, before Unity has that camera speed setting, I've actually created a scene camera movement "replacement" over here. Note that this of course changes how the camera controls work since this is a completely custom camera control. However it was designed to "mimic" Unity's own controls at that time. So I can't tell whether it still works on the latest Unity version.
Answer by Random Indie · May 16, 2010 at 02:45 AM
As far as I know there's no way to decrease the step size of editor camera. You could try using one of the alternate control schemes. Hit 'q' then hold the right mouse button. You can zoom in and out by movig the mouse up and down. Gives more precise control than the other ways.
Answer by EyePD · Apr 26, 2016 at 09:59 PM
I'm working on small objects a few cm in length. I was able to adjust the zoom accurately by doing alt-right mouse drag but the WASD step size is still a problem when working at small scale. I was able to kind of move and rotate around a bit by using right drag and left drag over and over but it's not the smooth WASD navigation we need.
Answer by Xarbrough · Jan 24, 2017 at 12:06 AM
This sounds like you are working at extremely small scale. There are a couple of reasons to advise against this, so maybe you want to try and scale up your scene instead of trying to make the camera slower. Basically, all calculations are limited in precision by the fact that floats are used to store things like position, transformation, collider size, etc. If you are working at very large or very small ranges, you might encounter problematic imprecisions. Also, the Physics system is modelled around the idea of 1 unit cube equals 1 meter. Lighting is another example where you might see issues. It is very likely that, whatever reason you have for a small scene, you can solve the problem in another way.