Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide a plug-in replacement for InterpolatedCamera, with Godot 4.0 #42970

Closed
ginobean opened this issue Oct 21, 2020 · 7 comments
Closed

Comments

@ginobean
Copy link

Godot version:

3.2.3

OS/device including version:

Linux.

Issue description:

InterpolatedCamera is now deprecated and will be removed in Godot 4.0.

Steps to reproduce:
n/a

Minimal reproduction project:

n/a

With Godot 3.2.3, I'm getting a deprecation warning re: InterpolatedCamera. Frankly, I don't know/care HOW InterpolatedCamera works. It does what I need it to.

Now, with Godot 4.0, it looks like you're removing support for InterpolatedCamera. When you guys come out with Godot 4.0, please provide a gdscript equivalent, for InterpolatedCamera, that we users can largely plug in, to replace the previous built-in InterpolatedCamera functionality.

Again, I was happy with using InterpolatedCamera and I don't quite understand your logic/reasoning behind removing it, but that is really your prerogative.

But I would greatly prefer NOT having to spend a couple days of my time reverse engineering this class if at all possible, and I think it will save a significant of users this same headache/aggravation, when Godot 4.0 comes around.

@akien-mga
Copy link
Member

@Xrayez
Copy link
Contributor

Xrayez commented Oct 21, 2020

For anyone stumbling upon this, the exact implementation can be provided by the Goost project in Godot 4.0 via C++ module capabilities as well once the engine becomes stable enough, but do note that the GDScript plugin linked above provides more functionality for interpolated camera.

Again, I was happy with using InterpolatedCamera and I don't quite understand your logic/reasoning behind removing it, but that is really your prerogative.

And yes, the downside is the same as using addons: it won't be built-in anymore... 😕

One of the reasonings I see is that the engine aims to become minimalistic at core (so it runs well on mobile and web platforms, removing features means less binary size), but I'm not quite sure if that's the case either. Also likely because there might be too many ways to implement this feature, like #19276. But yeah I agree that the class was simple enough and worked well for simple use cases.

Also, why the plugin is transferred to Godot Extended Libraries organization instead of officially maintaining it as part of Godot Engine organization? 😮

See also #42113.

@Calinou
Copy link
Member

Calinou commented Oct 21, 2020

Also likely because there might be too many ways to implement this feature,

This was the main motivation for moving InterpolatedCamera out of core. It doesn't really impact binary size significantly at all. Still, 3D camera smoothing is a complex topic with no "easy" solutions if you want to make a polished game.

Another upside of add-ons is that they can get fixes and improvements without having to go through Godot's development process. This makes them much more flexible in return.

@ginobean
Copy link
Author

ginobean commented Nov 6, 2020

A couple notes. The new InterpolatedCamera3D is NOT compatible with the current Godot release, 3.2.3. According to their docs, it only works with the master branch. So we developers can't simply plug it in and use.

Additionally, from looking at the code, it removes settings: 'Speed', 'Enabled', and adds new settings: 'translate_speed', 'rotate_speed', 'fov_speed', 'near_far_speed'.

So, it's far from a plugin replacement. And, from looking at the code, it looks it's doing some funky things with changing the fov dynamically.

I'm not sure this is a good idea. In my app, I'm actually calculating the fov and setting it myself, because I need it to be THOSE EXACT VALUES. I can't have a third party plugin decide those fov's for me.

And, I don't see how 'Speed' translates to the new 'translate_speed', 'rotate_speed', 'fov_speed', 'near_far_speed'.

I actually prefer the simplicity of the original 'Speed' setting, and again, it's not apparent to me how one would translate from one to the other.

Again, I was hoping for a simple plugin replacement.

Can you guys provide the original code/logic, or even pseudocode for the current InterpolatedCamera? That would make it trivial for us developers to code our own plugin replacement.

As it is, it looks like this new InterpolatedCamera3D has a different set of features, different enough that we can't simply or easily, replace the one with the other.

@Calinou
Copy link
Member

Calinou commented Nov 6, 2020

My plugin doesn't pretend to be a drop-in replacement (and has no plans to be one). It just provides a feature set that's similar in spirit, but is hopefully more useful in real world projects. Either way, an add-on currently can't provide a node that will work as a drop-in replacement.

So, it's far from a plugin replacement. And, from looking at the code, it looks it's doing some funky things with changing the fov dynamically.

It's not doing anything funky with changing the FOV dynamically. It just provides a built-in way to interpolate FOV, as this is a relatively common need in a polished game. InterpolatedCamera in Godot 3.2.x also interpolates the FOV anyway.

And, I don't see how 'Speed' translates to the new 'translate_speed', 'rotate_speed', 'fov_speed', 'near_far_speed'.

The old speed is equivalent to translate_speed, rotate_speed, fov_speed and near_far_speed. The plugin allows you to change those separately for greater control.

Can you guys provide the original code/logic

It's here: https://github.com/godotengine/godot/blob/3.2/scene/3d/interpolated_camera.cpp

@ginobean
Copy link
Author

ginobean commented Nov 6, 2020

Thanks! :).

@ginobean
Copy link
Author

ginobean commented Nov 8, 2020

Folks, I've just written a plugin replacement, called MyInterpolatedCamera, and placed it in the public domain. It has the exact same API as InterpolatedCamera, so you should be able to simply replace the one with the other.

It seems to work fine with Godot 3.2.3-stable.
You can get it here: https://github.com/ginobean/godot-interpolated-camera-replacement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants