[Suggestion] A different method for boats allowing amphibious vehicles
DrprofLuigi opened this issue · 6 comments
I see two ways to handle amphibious vehicles. One is to add an amphibious type that combines boat and car vehicle types. Another system is a bit more complex but more robust in my opinion:
Remove the boat type and engine_boat. Boats are just cars that have floating hitboxes. If a 'car' has a propellor, then the engine_car acts like an engine_boat in addition to driving wheels. Bonus points if the propellor adds a load to the engine when it's colliding with water. The Prop wouldn't need to rotate on its own, but rather have the rotation coded via the json.
Why do this? In addition to making amphibious vehicles easier from both a json and coding standpoint, it also allows boats to accept regular car engines (like a racing boat that uses a V8 car engine).
What about the boat that currently exists? That boat engine becomes a car engine with the boat customType (so it can't be put anywhere), and the prop becomes its own part. If that prop is set as a 'defaultPart' of the engine, there would be no change in the user experience whatsoever.
Because Trin has the only boat, it's still early enough to improve this system.
Trin also has an amphibious car remember
Trin Alligator
And that since V14 or V13
Every vehicle should have water physics improved tbh. I want a proper Hudson ditching instead of falling in like nothing is there
For non-floating vehicles, it could be as simple as reducing gravity if the center is in water ¯_(ツ)_/¯
So..
As to collision, that's hard to do. I think I have two ground points now for boats and cars, but I'm not entirely sure. As to the power, car engines use the feedback of the wheels and the speed of the car to define their speeds. One of the big points of overhauling the HUD code was to allow multiple engines in a single car and to thus allow boat and car engines in one vehicle, so I ain't going to do a 180 now that I'm making dual-engined vehicles like I've been asked.
As to the boat/car bit, I can probably combine them into a single car vehicle. Would just mean making them turn if a ground device (wheel, etc) or a boat engine is in the water. Drag is another issue, though I think cars have a drag coefficient? If not, that's something I need to take into account.
Either way, expect something like this, but not exactly what is proposed. I'm not going to kill myself messing with ground collisions a third time.