Plugin: Better studio camera

So this is something I made since I got sick of the camera controls being rubbish

If you have that annoying bug (not my fault!) where the camera is jittery/slow, you may want to try the version that doesn’t lock your mouse in place while you pan:

List of changes:

  • Changes your camera type to scriptable to work, may cause issues with camera-related plugins
  • F to focus now works on any selection, focuses the descendant parts
  • F to focus no longer zooms the camera to the bounding box of whatever you’re focusing unless you’re more than twice as far as the bounding box
  • Shift+Wheel now zooms the camera slowly (proportional to your shift movement speed)
  • Shift+Drag now pans slowly (kinda proportional to your shift movement speed)
  • Everything runs at 60 FPS so it doesn’t look choppy if you’re moving and rotating at the same time
  • No more weird “hold a direction for ten seconds for a turbo boost” behavior

Let me know what you think!

I’m not sure what to think – although it’s smoother, something like the camera that just feels second-nature at this point becoming slightly different feels unsettling. I wouldn’t have a problem switching to a completely new camera system like 3DS Max’s camera; the problem with this is because it’s so similar – in the back on my mind I’ll always be thinking “something’s wrong”.

Regardless though, I appreciate it. I really wanted to unbind q/e from the studio camera to be able to use them to bring up other plugins, and I was always stuck in a loop of “I really want to disable q/e but it’s not thatttt important so I won’t bother creating a custom camera”. I removed a couple lines of code in your plugin to unbind q/e and now my mind isn’t going back and forth in regards to q/e anymore – that was a huge relief. Also, something you missed was the arrow keys. It works out well for me because I wanted to unbind the arrow keys as well so that I could use them with CmdUtl in order to shift parts in a certain direction by the exact stud increment since the handles are not very precise, but there are bound to be people out there that use the arrow keys so you might want to edit your plugin to include those.

Oh, and it doesn’t work in Start Server because it uses RenderStepped. You should check if RenderStepped can be used and use Stepped if it can’t.

Pressing F to focus on a part/model isn’t working as expected either – to see what I mean:

Create a part in a place with the plugin active and a place with the plugin inactive
In each place, select the part, press f, move to the left a bit, press f, move to the left a bit, press f, etc
You’ll see that your plugin doesn’t emulate the current behavior correctly. It seems that the default one preserves rotation and just moves your camera to the part while yours rotates the camera to the part and doesn’t move closer to it at all.

Edit: For reference, pressing F always results in your camera being exactly [largest size of part] studs away from the part with the default camera.

You also said it doesn’t zoom in to the part unless you’re twice the distance of its size away, but it doesn’t zoom in period After pressing F on a part on the middle of the baseplate:

Though, I do like that yours lets us focus on tools instead of having to select the handle or something :wink:

Use Heartbeat; Stepped depends on RunService. Wouldn’t want the camera to stop moving if the game is paused.

I noticed that it was also missing the acceleration over time. If you move for long enough with the default camera, it starts to accelerate. I did some testing of my own, monitored the movement of the camera, and organized that raw data in Excel and pretty much figured out how it worked:

It appears that for the first 2 seconds you move the camera, it doesn’t accelerate at all and you just move forward by the CameraSpeed. However, after 2 seconds, the camera starts to accelerate by 1/60th of the CameraSpeed each frame. If your CameraSpeed is 1.5, it accelerates by 0.025 – if it’s 1.5, it accelerates by 0.25. There does not seem to be a cap for maximum speed. If you hold shift and move the camera it doesn’t move the camera by the CameraShiftSpeed amount like you thought it did – it moves by CameraSpeed * CameraShiftSpeed while you’re holding shift. If your CameraSpeed is 15 and your CameraShiftSpeed is 0.2 you’ll move by 3 studs forward each frame. The camera does not take acceleration into account while you are holding shift, but after further testing it seems as if you hold shift, move for a couple seconds, and release shift while still moving forward, your camera accounts for acceleration and even though you weren’t accelerating while holding shift when you release it you gain all of the acceleration that the camera ignored previously.

Thanks for all the reports! I purposely left out the acceleration because I think it’s super annoying to suddenly start moving faster. Maybe I’ll add an options menu.

About the “something wrong” thing I was talking about: it wasn’t because it was smooth – it’s because the camera is moving at twice the speed. The default camera runs at 30 frames per second, so it’s moving CameraSpeed * 30 studs per second. Since the smooth camera uses RenderStepped, it’s now moving CameraSpeed * 60 frames per second. You should halve the CameraSpeed. The CameraShiftSpeed is fine though since it’s just a modifier and not an actual speed.

I was wondering why you had F run on KeyUp instead of KeyDown – found out the hard way :frowning:. Pass that along to an engineer?

I was excited 'til I saw ‘no turbo boost.’ Then I’m like “no” because that is literally my favorite feature about ROBLOX’s camera.

I was actually working on Ethan’s camera for a bit and I have the acceleration over time in my copy. It’s pretty much a 100% duplicate of ROBLOX’s camera at this point (F to focus on a part works minus that bug I posted about) except it’s smooth.

I might as well post my edited versionexact same number of lines as the original oddly enough.

Changes:
Camera accelerates over time
Q/E movement removed
F focuses on part correctly now
Shift no longer affects rotate speed (it’s already sensitive enough to rotate any way you need it to – making it slower just makes it harder to use)
Correct speed instead of double speed
Correct shift speed – Ethan thought it was an actual speed and not a modifier so he got it wrong

[quote] – exact same number of lines as the original oddly enough.

Changes:
Camera accelerates over time
Q/E movement removed
F focuses on part correctly now
Shift no longer affects rotate speed (it’s already sensitive enough to rotate any way you need it to – making it slower just makes it harder to use)
Correct speed instead of double speed
Correct shift speed – Ethan thought it was an actual speed and not a modifier so he got it wrong [/quote]

git rekt, arceusinatro

Just wanted to re-iterate how much I appreciate this. Although I had to edit it a bit to get the behavior I wanted, this is still amazing. At first I thought “Oh, that’s neat – I’ll try it out but I probably won’t end up being too terribly thrilled by it”, but as I’ve continued to use it over the course of two days now, I am constantly amazed by the smooth movement of the camera and at this point I can’t imagine myself using the default camera. Awesome job on this – you should ask one of the engineers if the default camera can be bumped up to be controlled at 60 fps so everyone can enjoy it.