-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add new method for getting multiple rest infos #101676
base: master
Are you sure you want to change the base?
Conversation
There's some whitespace problems. Try. python3 install pre-commit
pre-commit run -a |
80784ae
to
5f75784
Compare
I'm not familiar enough with the code of For instance in XR the player can be teleported to a new location and while we check for collisions at that location, other tracked elements like the players hands, and anything the player is holding may end up colliding. I'm not sold on the name of the new function but I can't currently think of a better one that fits our current approach. This logic should be part of the original The other long outstanding wish that has come up many times is for functions like this not to return a dictionary, but instead create a data resource class with proper storage and access methods. We then return an array of these objects (they will be |
I support this idea, since, assuming someday the dictionary return types will be replaced, this will save some future time and can be done for this new function without breaking compatibility. Yes, this would make this the odd duck out, but this change should happen someday to the rest of the query functions. So, I could create the ... Also, I noticed the collision depth is not currently exposed by |
Proposal: godotengine/godot-proposals/issues/11609
(Implements this proposal, but with a new method instead: godotengine/godot-proposals/issues/9341)
This PR aims to add a new method for
PhysicsDirectSpaceState
(2D and 3D), that retrieves shape rest info from all contacts, with the ability to limit the number of results returned. This needs to be implemented in Godod Physics 3D, 2D, and Jolt Physics.Initially I only implemented this for Godod Physics 3D, so I can get an approval for the idea and the current commited changes.
Currently there is no method for checking a shape's intersections in a space and getting detailed information about all contacts, which I think is an important feature to have. Ideally, this is how the
PhysicsDirectSpaceState.get_rest_info
method should work, since if you want only one result to be returned, you can limit the number of results returned to 1 with themax_results
parameter of this proposed new method, and you get the same result asPhysicsDirectSpaceState.get_rest_info
, which can only return one. To avoid breaking compatibility though, this has to be a new method.