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

VehicleBody not react to collision layers #42253

Closed
Tracked by #45333
SinaZK opened this issue Sep 22, 2020 · 9 comments · Fixed by #46795
Closed
Tracked by #45333

VehicleBody not react to collision layers #42253

SinaZK opened this issue Sep 22, 2020 · 9 comments · Fixed by #46795

Comments

@SinaZK
Copy link

SinaZK commented Sep 22, 2020

Godot version:
3.2.3.stable

OS/device including version:
MacOS GLES2

Issue description:
I create 2 collision layers one for ground (bit 1) and one for car (bit 2) and set ground mask to collide with car and car collide with ground and everything is working fine. But when i want to car not colliding with ground and set the both bodies (ground and car) collision mask to 0 (both in editor and script via set_collision_mask) but car collide with ground! no matter which collision layer set for ground, car always collide with it. But when i set the ground collision layer to zero they don't collide anymore! I tested with a RigidBody box and it works fine. I think maybe There is an issue for VehicleBody Wheel raycasts?

@pouleyKetchoupp
Copy link
Contributor

Please provide a minimal project to help with investigating.

@Zoomulator
Copy link

I've encountered the same problem.
Here's a reproduction:
GodotWheelCollisionMask.zip

It seems the wheel ray cast doesn't pass the collision mask at all:

bool col = ss->intersect_ray(source, target, rr, exclude);

I assume it defaults the mask to 0xFFFFFFFF, which would make it check against all the layers.

I'd guess the ray should have the same mask as the vehicle, or even have its own defined per VehicleWheel.

@angad-k
Copy link
Contributor

angad-k commented Mar 8, 2021

Sending a PR for this

@mojoyup
Copy link

mojoyup commented Sep 24, 2021

Would this be the same as what I mention here? I want to make sure I dont create a new issue if not needed. godotengine/godot-proposals#3341

@mojoyup
Copy link

mojoyup commented Sep 24, 2021

This is my zip project I made to replicate my collision issues with it. Hope this is helpful! My apologies if I do anything wrong or post wrong at all. ZIP FILE

@pouleyKetchoupp
Copy link
Contributor

@mojoyup Yes, it is the same issue. What version are you using? It should be fixed starting on Godot 3.3 (current stable is 3.3.3).

@mojoyup
Copy link

mojoyup commented Sep 24, 2021

@pouleyKetchoupp Oh thats good to hear that its the same. Thank you. I am using this: Godot Engine v3.2.3.stable.custom_build - https://godotengine.org
So, that would make sense then :) I build Godot from code, but I can always grab the latest version. Updates quick :P Would you like me to verify it is fixed in the newest version? Hope all is well!

@pouleyKetchoupp
Copy link
Contributor

@mojoyup That makes sense! I've tested your project with the offical 3.3.3 build so I can already confirm it's fixed, but let me know if you have any problem.
And just make sure to update you custom version from the 3.x branch and not master, otherwise you'll have compatibility issues with your existing projects.

@mojoyup
Copy link

mojoyup commented Sep 24, 2021

@pouleyKetchoupp Thank you very much :) I just became a patreon also :) Worth it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants