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

Nim constructor not found for class BulletPhysicsDirectSpaceState #102

Open
geekrelief opened this issue May 16, 2021 · 1 comment
Open

Comments

@geekrelief
Copy link
Contributor

Using Bullet, on a Spatial object I'm trying to do a ray cast with PhysicsDirectSpaceState

  var spaceState = self.getWorld().directSpaceState

The above generates an error from godotnim.nim. asNimGodotObject calls newNimGodotObject with the name returned from godotinternal.nim#getClassNameRaw().

BulletPhysicsDirectSpaceState is not part of the api.json.

This isn't the fault of godot-nim. The godot engine doesn't export it properly. The work around is modify godottypes.nim with a new type and register the class.

BulletPhysicsDirectSpaceState* = ref object of PhysicsDirectSpaceState

...

registerClass(BulletPhysicsDirectSpaceState, "BulletPhysicsDirectSpaceState", true)

I've bugged this godotengine/godot#48752 and created an engine PR to fix.

@endragor
Copy link
Member

Yes, this basically duplicates #91. Thanks for submitting the PR to Godot.

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

No branches or pull requests

2 participants