-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
get_collision_face_index() is not implemented #268
Comments
Seems like the face_id is not implemented, it will always be -1. Needs impl. Function docs: https://docs.godotengine.org/en/stable/classes/class_raycast3d.html#class-raycast3d-method-get-collision-face-index Rapier exposes at raycast a property that can be used for this: /// Feature at the intersection point.
pub feature: FeatureId, Sending this out from callback and then sending it out for callback could be a solution to this. The feature returned is of type: #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, Default)]
pub enum FeatureId {
/// Shape-dependent identifier of a vertex.
Vertex(u32),
#[cfg(feature = "dim3")]
/// Shape-dependent identifier of an edge.
Edge(u32),
/// Shape-dependent identifier of a face.
Face(u32),
// XXX: remove this variant.
/// Unknown identifier.
#[default]
Unknown,
} Then there is also making sure the shape is in sync between rapier and godot(which should be the case). If such returning the id should work, however it seems rapier knows if its a vertex, edge or face. So we need to convert somehow from that to face at all times(maybe iterating through all faces and check if the edge or vertex is part of a face). Note: |
I don't mind it, it's just that I wasn't necessarily writing a bug report and didn't know how to put down a missing feature or other issue. Apologies if it seemed like I was frustrated about it |
No problem. You didn't seem frustrated, no worries. |
Describe the bug
RayCast3D's
get_collision_face_index()
doesn't work at allI tested this with the .NET build and originally stumbled across it with C# scripts, but it seems to be non-functional with GDScript as well. Code works perfectly fine with in-built physics
To Reproduce
get_collision_face_index()
functionExpected behavior
Please don't make me say "
get_collision_face_index()
didn't work" because I'm going to say that it did this and always returned -1Environment:
Example project(zip)
Written in GDScript to test non-mono builds
raytouchy-example.zip
The text was updated successfully, but these errors were encountered: