Open AaronRecord opened 3 years ago
cc @BastiaanOlij @pouleyKetchoupp
I actually changed all the ranges and defaults in my local build, as they make no sense. Also, engine_force
should be able to go negative as well.
Also,
engine_force
should be able to go negative as well.
Can't it already?
Note: A negative value will result in the wheel reversing.
I'm not very familiar with Vehicle nodes, but it would make sense for the default values and the documentation to be consistent.
This could be checked for 4.0 so we can afford potentially breaking compatibility for some users by changing the values.
Also,
engine_force
should be able to go negative as well.Can't it already?
Note: A negative value will result in the wheel reversing.
Yes, but it can't be set in the editor. Most editor ranges are wrong, e.g. are from (0-1), but should be to (-10 or lesser - 10 or greater).
I'm not very familiar with Vehicle nodes, but it would make sense for the default values and the documentation to be consistent.
This could be checked for 4.0 so we can afford potentially breaking compatibility for some users by changing the values.
My experience so far is that the default values aren't very usable so I doubt people will have kept them as is. That said, seeing where we are in the Godot 3 dev cycle I would also recommend this be a Godot 4 change.
On what the values should actually be, I've had very mixed results with my Vehicle tutorial. I was working on a setup where I can change the values in game to play around with their effects. Also something in 3.2.x has changed where it interacts very badly when you use a large box collider as the ground. That is probably a completely separate issue.
Anyways, we need to settle on some default values that actually make sense and double check if the descriptions I've added to the documentation are correct. While for some I know they do exactly what they should, some others were guesses based on bullet writeups.
One thing that would make a lot of sense is to create a small sample demo with some different terrains and a few different cars and a UI that allows us to change the settings. Show different settings for racecar / offroad / etc. and function as a test bed for vehicle physics.
@BastiaanOlij: I wanted to have the "drag sliders to adjust" minigame, too, but I ended up providing "setups" (tire 1, tire 2, brakes 1, brakes 2) because some combinations didn't work properly.
The TruckTown demo could probably be revived/reused as a car demo "with different terrains and different cars". I have (mostly) working city car and bike setups (I made the bike by dragging the wheels to be next to each other, so that visually they look like a single wheel), but I have 0 idea where to start on an offroad setup.
Describe the project you are working on
A game with cars.
Describe the problem or limitation you are having in your project
Some of the defaults for VehicleBody and VehicleWheel are bad and aren't in agreement with the documentation.
VehicleBody:
mass
's default is40
kg, even though most cars are 1300+ kgVehicleWheel:
wheel_friction_slip
's default is10.5
; documentation says "It's best to set this to 1.0 when starting out."suspension_travel
's default is5.0
; documentation says "try a value between 0.1 and 0.3 depending on the type of car"suspension_stiffness
's default is5.88
; documentation says "use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car."Are these values very off because of the low mass of the car? Either way, I think either the documentation or the defaults should be modified because they don't really make much sense.
VehicleBody Documentation VehicleWheel Documentation
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Change the default values for these parameters to be more sensible (or update the documentation if that's what's incorrect).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
VehicleBody and VehicleWheel are in core