Skip to content
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

[Bullet] No shape ID in a result of RayCast against PhysicsBody with multiple ConcavePolygonShapes. #62223

Open
dmitrijbes opened this issue Jun 19, 2022 · 2 comments

Comments

@dmitrijbes
Copy link

Godot version

v3.5.rc4.official [e047c50]

System information

Windows 10

Issue description

According to doc intersect_ray must have shape id in resulting Dict.
However, its always 0.

This issue was already reported and fixed in #55533.
According to changelog it must be fixed in 3.5 rc4.

It doesn't.

Steps to reproduce

  1. Create 2 Shapes and add to StaticBody.
  2. Racayst shapes using intersect_ray.
  3. Look for shape id in raycast result Dict.

You can find example in attached MRP.

Minimal reproduction project

raycast_shape_bug.zip

@dmitrijbes
Copy link
Author

I dug into it more and stumble upon great research by pouleyKetchoupp.
In short, its a bug of Bullet integration, which was quick-fixed with exception:
Single PhysicsBody, which owns multiple ConcavePolygonShapes always return 0 instead of shape id.
As always with such things, this unlikely exception is exactly my case)

How To Fix
I circumvented issue by switching to GodotPhysics.
Project -> Project Settings -> Physics -> Physics Engine

Still would not close this issue, because solution is far from good and issue is not documented anywhere.
I spent several hours fixing it, hopefully this info will save someone's time)

@dmitrijbes dmitrijbes changed the title No shape ID in RayCast result Dict. No shape ID in a result of RayCast against PhysicsBody with multiple ConcavePolygonShapes. Jun 19, 2022
@dmitrijbes
Copy link
Author

Probably related to: #57452.

@akien-mga akien-mga changed the title No shape ID in a result of RayCast against PhysicsBody with multiple ConcavePolygonShapes. [Bullet] No shape ID in a result of RayCast against PhysicsBody with multiple ConcavePolygonShapes. Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants