Godot Version
v4.4.1.stable.official.49a5bc7b6
Question
I’m trying to make a custom PhysicsBody3D in GDExtension.
If I make it extend a concrete class like CharacterBody3D or StaticBody3D it works perfectly, but keeping the same template and making it extend PhysicsBody3D will fail silently:
- Extension compile with no error
- Godot load extension with no error Console says “Extension class ‘MyCharacterBody3D’ cannot extend native abstract class ‘PhysicsBody3D’.”
- Custom test class GDExample that i kept in the extension load with no problem and is disponible in the editor
- CustomPhysicsBody3D is nowhere to be found, and not recognized as a class when trying to extend from it
I have read from Swap the names of the engine's internal "abstract" and "virtual" · Issue #11791 · godotengine/godot-proposals · GitHub that “Abstract classes cannot be instantiated period, and cannot be extended by script or GDExtension.”
I would like to herit the behavior of PhysicsBody3D without the burden of supplementary behavior (i.e. by extending a child of PhysicsBody3D like StaticBody3D).
Is it not possible to expose to GDScript a custom class extending PhysicsBody3D ?
Might be linked to: Can't add custom node type when it extends from abstract class