-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
body_test_motion not available in gdscript on PhysicsServer #20276
Comments
Can we please fix that? I don't think it's too much work :c |
Just ran into this myself. I don't imagine this should be too difficult, would it be fine for me to take a crack at it? |
you can use this https://docs.godotengine.org/en/3.2/classes/class_physicsdirectspacestate.html instead (and for some things this is better choice) |
That's a significant amount of code required to work around an asymmetrically exposed method, imo, it'd be easier to just manually expose it unless you've got a need for some more unique work cases (which godotengine/godot-proposals#710 helps with in a lot of cases) |
The way the source code is organized seems to make this nontrivial. |
So, exposing it only requires the same setup as the 2D version, namely a wrapper around MotionResult, and a proxy method. Did have a crack at it before and got it working, but ran into some issues (segfault) with passing it certain Rigidbodies - which were, from memory, any non-kinematic bodies. |
Godot version:
master
Issue description:
body_test_motion()
is available onPhysics2DServer
but not in the 3D server (PhysicsServer
). It would be quite useful to have in 3D physics to implement custom physical motions.The text was updated successfully, but these errors were encountered: