Open kopeek opened 1 month ago
VehicleBody3D and VehicleWheel3D are straight ports from Bullet physics.
The original does not support what you request, so the port does not either.
This class is very simple and is really designed for very basic use, if you want something more advanced you'd likely be better off making something yourself from scratch, vehicle physics is an area that is very dependent on your specific needs and the engine is unlikely to be able to provide support for all any user might want or need
I would suggest investigating how well it would work to create templates for this, using other physics entities, like joints, to achieve more specialized vehicle physics
I would say this should be an add-on with standard templates for vehicles, assuming the other components are sufficient to achieve this, if they aren't that's a good argument to look at either making some improvements to the existing vehicle code (though unlikely, as they are very limited and hard to make flexible) or to achieve the same with an add-on providing more powerful code
But they should separate things or make so I have a choice. This is game engine, so it should have more built-in options instead of coding yourself for several hours.
We can't possibly provide built-in options for everything in ever combination, vehicle physics is very dependent on the exact game style you're using, and it's a very specialized feature, it's far more specialized than almost any other node we have, far more so than any other physics node for example
We also don't have any RPG specific classes or code, or any rhythm based game things built-in, etc.
For anything that's built-in we have to consider if it is enough, if it is configurable enough to be useful, etc. if it takes a lot of work to make a node that works for a reasonably large part of the target audience, or if it's just impossible, then it's not reasonable. We prefer to provide the basic tools to make things, or when some things are just too hard to do on your own because it takes a lot of work (like for example rendering stuff, or particle stuff, where you could do at least some of it on your own but it's hard even for experienced users)
I also don't know that most driving based games would even use a node like this for these purposes, you don't generally have to or even want to simulate the small details like the exact wheels etc. unless you are making a game where physics specifically is the focus
Note that because VehicleX nodes are so specialized there's been an open proposal to move them out of core to modules
I'm curious what you are hoping to achieve? I've made 1, 2, 3, and 4 wheeled things using VehicleBody3D and found it quite flexible.
Are you wanting to define swingarms and shock force angles? Or?
In reality all the fancy designs tend to be compensating for the fact that the ideal is linear motion, but all the parts pivot and swing in arcs. With a VehicleBody3D you can forget all of that and define bottom out position and travel. If you want to animate swingarms, you might be better to just match their position + rotation to look good based on the wheel movement of the Wheel3D objects.
Or am I completely misunderstanding what you're after?
VehicleWheel3D doesn't have option for the suspension etc, to change the pivot point
Describe the project you are working on
I worked for a while on a project with a car
Describe the problem or limitation you are having in your project
When I use VehicleWheel3D, I can't configure how Wheels is attached I want to have option to:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It helps make different car and you can make more flexible wheels
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It can still be attached to VehicleBody3D but to connect it, you will need to connect it with pinPoints and springs. It also should have options to enable custom pinPoints and springs etc. So you can make custom attachments. but If there is no need, you don't need to use custom.
If this enhancement will not be used often, can it be worked around with a few lines of script?
probably not
Is there a reason why this should be core and not an add-on in the asset library?
You have more flexibility when setting VehicleWheel3D