I wanted to contribute to the engine, Unfortunately, I can't find the
location of the GDScript-Class Definitions (more precisely KinematicBody2D)
The only thing, I find are the Icons...
What you are asking is a bit ambiguous, because GDScript is only one scripting language that goes on top of Godot's C++ API. You could refer to:
- The scripts or classes defined within .gd files
- The C++ classes of the engine itself (Sprite, KinematicBody2D...)
- The locations where C++ classes are made accessible to the API (which in turn allows GDScript or VisualScript to use them)
I think what you are looking for is scene/2d/physics_body_2d.h/.cpp, if you are looking for the C++ class itself.
(not obvious due to different filename, but a quick search will do with an IDE)
Thank you very much!
Another question: If I do
I get a collider, but I don't find that file either
get_collider returns a Variant, I guess it can be several types of physics nodes, or null. You may be able to cast it according its type: if it's not null, then get the variant as an Object, then test its type through reflection, however I never did that before. You have to find it by yourself (I am busy at the moment sorry^^)