-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add collision mask and layer properties to VehicleWheel (like VehicleBody) #3341
Comments
@mojoyup Vehicle wheels use the same collision mask as the parent vehicle to keep it consistent, so you should be able to just modify the collision mask on the VehicleBody node for the wheels to ignore certain collisions. Does that help? From what you describe it seems like your vehicle wheels and body can be set to ignore the same objects, but let me know if your use case needs something different. |
@pouleyKetchoupp: I remember being confused by the same thing, so it should be better clarified in the docs. |
@Zireael07 That's a good point, I've just opened godotengine/godot#52983 to keep track of this. |
@pouleyKetchoupp Thank you for the insight :) From what I am experiencing, my vehicleWheels are not ignoring the collision of a staticbody that I am using in the map. The vehiclebody goes through just fine but the wheels still recognize it as a collision. It's weird because it acts as if there is a speed bump rather than a whole solid too :P. If I go fast enough I can push through it. Should I mention this in the above link to keep track? Thank you! EDIT: I may need to just redo the vehicle because it is all in code. Ill work on that before I do anything bug related as it might be on my end. |
@mojoyup Alright, maybe there's a bug in some circumstances. After you check your vehicle script don't hesitate to open a new issue with a minimal project if you still have problems. For now I'll close this proposal since it looks like there's no need for a new functionality. |
Thank you and will do. It is still having issues so Ill minimize it into a loadable project and post soon :) |
Describe the project you are working on
I would like to respectfully request the ability to have collision masks and layers for vehicleWheels. Currently, the vehicleBody has them but the wheels do not, which limits me to be able to control collision exceptions in physicsBody codes for gdScript. I am working to have only certain vehicles collide with track borders, where those vehicles are NPCs. The players I want to have the ability to go through the borders and explore the rest of the map in the vehicle.
Describe the problem or limitation you are having in your project
The limitation is not having the control over vehicleWheel nodes that collide with every physicsBody. I want to mask them out of certain collisions.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Having collision masks and layers added to the vehicleWheels independent of the vehicleBody would be great for the physics.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This will work specifically with gdScript as I am able to utilize the add_collision_exception_with() code in any of the physicsBodies. I can simply code that in or even better control it from the GUI just as with other nodes of that feature implemented.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes! It may only be needed for the task I am requesting it for. :)
Is there a reason why this should be core and not an add-on in the asset library?
I think it should be core because many people who get into this engine that mess with the vehicle nodes, love them. They are just limited. I can understand using a KinematicBody for this and just coding it all in, but I like to do both and I love the vehicle nodes also. The KinematicBody has to have gravity and such also coded in manually, whereas the vehicle takes care of those fundamentals already.
The text was updated successfully, but these errors were encountered: