You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
In order to implement a reliable work-flow for kinematic bodies i need to gather information about all the collision normals touching the shape + an margin. This can not be achieved right now with a simple test, because get_rest_info will only provide the nearest one. The solution is to create a whole shapeCast node (Intended for movement) and provide it a motion vector of zero. This adds unnecessary complexity to a check that is often frequently needed in order to implement proper collision response and depenetration for all kind of purposes. Also, this solution is not obvious to the end user, as they will look at the PhysicsDirectSpaceState documentation page, which is supposed to provide the most complete data about the state of a physics body.
It also lacks the margin that ShapeCast node provides, which helps detecting geometry very near to the shape and react to it.
Both of this features are already implemented, but they are only available on ShapeCast node.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
add a max_collisions parameter to get_rest_info, so it can be used to handle collision response against multiple contacts based on their position and normals.
Add a "margin" parameter. As it happens with ShapeCast.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The Godot source code is still a bit confusing to me, but the ShapeCast node is providing this information already, so suspect there is already a way of gathering this data and adding this margin to the check on the code, just not exposed to the user.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No. Collision data is extremely complex to gather from scratch.
Just in case: Doing get_rest_info, add that body to the exceptions list and do it again is not equivalent. If the collisions are against the same body, you will get only one and there still is no margin.
Is there a reason why this should be core and not an add-on in the asset library?
Improving the usability and robustness of the collision data is core functionality of a 3D engine, as everything that interacts in a physical way relies on this methods.
The text was updated successfully, but these errors were encountered:
Hi! When i made this post i was referring to the fact that a shape cast node would do the trick, but i was wrong.
The shapeCast node does not really provide enough information either. It will only give you one contact per object, so, unless every triangle is a different object, as far as i know, this is just not possible for the end user.
Unfortunate. Thanks for the investigation anyway. As someone making a Quake-like, I've been fiddling it for months now. I hope we can find a path forward soon for Godot (and perhaps Jolt, though I know there wasn't much success over there either from the GH issues).
If you would like to talk further sometime about things I would really like to perhaps see if we can figure anything else out, though GitHub is a bit awkward to communicate on sometimes. Please let me know if you'd be interested at all!
I proposed a new method for getting all the contact infos from a shape intersection check, because I was told on Godot Contributors Chat to avoid breaking compatibility. /issues/11609
Describe the project you are working on
An sliding algorithm.
Describe the problem or limitation you are having in your project
In order to implement a reliable work-flow for kinematic bodies i need to gather information about all the collision normals touching the shape + an margin. This can not be achieved right now with a simple test, because
get_rest_info
will only provide the nearest one. The solution is to create a wholeshapeCast
node (Intended for movement) and provide it a motion vector of zero. This adds unnecessary complexity to a check that is often frequently needed in order to implement proper collision response and depenetration for all kind of purposes. Also, this solution is not obvious to the end user, as they will look at thePhysicsDirectSpaceState
documentation page, which is supposed to provide the most complete data about the state of a physics body.It also lacks the margin that ShapeCast node provides, which helps detecting geometry very near to the shape and react to it.
Both of this features are already implemented, but they are only available on ShapeCast node.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
add a
max_collisions
parameter to get_rest_info, so it can be used to handle collision response against multiple contacts based on their position and normals.Add a "margin" parameter. As it happens with
ShapeCast
.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The Godot source code is still a bit confusing to me, but the ShapeCast node is providing this information already, so suspect there is already a way of gathering this data and adding this margin to the check on the code, just not exposed to the user.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No. Collision data is extremely complex to gather from scratch.
Just in case: Doing get_rest_info, add that body to the exceptions list and do it again is not equivalent. If the collisions are against the same body, you will get only one and there still is no margin.
Is there a reason why this should be core and not an add-on in the asset library?
Improving the usability and robustness of the collision data is core functionality of a 3D engine, as everything that interacts in a physical way relies on this methods.
The text was updated successfully, but these errors were encountered: