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

[GodotPhysics] Inconsistent physics detection for a certain collider #64309

Open
Zireael07 opened this issue Aug 12, 2022 · 3 comments
Open

[GodotPhysics] Inconsistent physics detection for a certain collider #64309

Zireael07 opened this issue Aug 12, 2022 · 3 comments

Comments

@Zireael07
Copy link
Contributor

Zireael07 commented Aug 12, 2022

Godot version

4.0 alpha 14

System information

Linux Manjaro, Vulkan, Intel Kaby Lake

Issue description

A certain collider is intermittently NOT being picked up by physics (detection, collision works always). It will be picked up for a couple of frames/seconds, then not picked up while still in the shapecast/being pointed at by a raycast. Car speeds are very low when this happens - I axed HUD entirely for this minimal repro but they rarely exceed 60 kph in the city except on the longest straight, and meshes involved are in the corners where speeds are usually 15-20 kph at most (i.e. 4-5 m/s). Due to low speeds involved, I do NOT think it's a tunnelling issue.

Haven't tried Area3D but since raycasts and shapecasts both have the problem (actually I was hoping shapecast would finally detect the fr**** lamps) I think it's a physics issue. Physics engine is DEFAULT, whatever it means currently.

Steps to reproduce

Load the minimal repro, run main.tscn, drive around a bit with visible collision shapes ON. You'll see that in some cases, both the shapecast and raycasts will fail to detect the streetlamp even though it's well within the shape

Screenshot_20220812_113146
.

Layers are set so that the ground collision is ignored, also ignore the fact the car is fugly ;P

Arrows to drive, T to switch to top-down camera

Minimal reproduction project

PhysicsTest.zip

@Calinou Calinou changed the title Inconsistent physics detection for a certain collider [GodotPhysics] Inconsistent physics detection for a certain collider Aug 12, 2022
@Zireael07
Copy link
Contributor Author

Nb. I just changed the collider to two cylinders (in my main project) and so far so good, haven't been able to trigger this and I'm seeing AI got markedly better at detecting the lamps, so it's either convex shape or its complexity (please please have Godot tell us somewhere how complex the fripping shape is!)

@Calinou
Copy link
Member

Calinou commented Aug 12, 2022

(please please have Godot tell us somewhere how complex the fripping shape is!)

Look at the number of points when editing a ConvexCollisionShape in the inspector. If it's above a few hundred, there's usually a problem (especially for a small object).

@Calinou
Copy link
Member

Calinou commented Mar 29, 2023

I can confirm this on 4.0.1.stable (Linux).

Minimal reproduction project updated for 4.0.1: PhysicsTest_4.0.zip

simplescreenrecorder-2023-03-29_19.03.55.mp4

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