-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Are the GDScript built-in functions available in GDNative? #107
Comments
No, unfortunately not, they have to be hardcoded and not all of them have been implemented yet. The only functions implemented are for printing, New ones should be implemented in the same class, but for now we need workarounds. |
If you let me know what you want for this, I'll be happy to open a PR. Its unfortunate that code can't be reused as it feels a little nasty to have the same code implemented multiple times within the engine, but I guess I'd rather have them duplicated than not available.
|
The main things I need for my own project is the mesh modification library. I was looking to do some large-scale procedural mesh generation, and GDScript is much too slow and regular C feels too archaic (eg, no built-in object oriented libraries, etc). |
@jacksondus shameless plug: https://github.com/BastiaanOlij/gdprocmesh @danielytics if you're still up for it I think it would be nice to have some of those functions implemented. Not sure what the best place for them would be though... |
Hey! Can't we include the Godot files instead of re-implement it, when we build the godot-cpp? Or maybe make that interface with Godot:: like the print implementation? |
I achieve to use godot's source code in my gdnative sample, I added the {godot_path} and {godot_path}/platform/{x11/...} in my CPPPATH and I could use it without issue. |
I'd like math functions to be added like in the engine, under a
|
Are the GDScript built-in functions (as listed here http://docs.godotengine.org/en/3.0/classes/[email protected]) available from GDNative? Obviously many of the math functions are available in cstdlib and cmath, but not all, for example
clamp
,lerp
,wrapf
and it would also be useful if the same random number generator could be used globally.The text was updated successfully, but these errors were encountered: