anatolbogun / godot-smoother-node

A Godot node type that smoothes scene nodes' movements by interpolating between _physics_process steps.
MIT License
92 stars 4 forks source link

Doesn't work for Godot 4.2.1 #7

Open Frexitsch opened 4 months ago

Frexitsch commented 4 months ago

"Smoother.gd" does not appear on the list when trying to add a new node. Doesn't seem to function when attached manually.

smooth

officialduke99 commented 2 months ago

I ran into this as well, but this has to do with how Godot treats the res://addons folder. You can notice, that if you move the /smoother folder into the root, the node does appear as it should. I assume this has something to do with this addon only being a single script, not an entire addon with files like plugin.cfg and the main plugin.gd extending an EditorPlugin. Not sure if the correct fix would be on the addon's or Godot's end, but you can fix it by either moving the addon's folder or by making the correct plugin structure yourself. Hope this helps!

anatolbogun commented 2 months ago

Thanks for reporting this, @Frexitsch , and sorry for the late reply to the original post. I don't seem to be on top of these issues, I should really revisit my notification settings.

Yes, it's just a single script, so @officialduke99 's assumption could be correct. I've never written a "proper" plugin and the class_name Smoother always worked for me. I put it into my project directory, however, so that's probably why I never had issues with it. I need to read up on how to make it work as an addon.

On a related note, since Godot 4.3 Beta 1 you can find built-in physics interpolation for 2D, with the same feature for 3D coming in a future release, probably in Godot 4.4 . You can enable it at Project settings > Physics > Common > Physics Interpolation. See the release notes here.

So if you can use the latest 4.3 beta version, I highly recommend switching to the built-in physics interpolation. It has more node support, e.g. RigidBody2D, which I couldn't get to work in the Smoother node. Just make sure to disable or delete the Smoother node; running the native and Smoother interpolations concurrently messes things up.

Frexitsch commented 1 month ago

Thanks for your help folks, much appreciated (: