GDCustomRaycastVehicle
GDCustomRaycastVehicle copied to clipboard
Godot 4.2 migration
Mainly following https://docs.godotengine.org/en/stable/tutorials/migrating/upgrading_to_godot_4.html
Currently, the main stopper is space.cast_motion(params)
seem to be working differently than it was in Godot 3. It returns [1,1]
when road wheels collide with the floor. This makes M113 to fall through the floor. So I keep this PR in draft until I come up with fix for that.
https://github.com/Tobalation/GDCustomRaycastVehicle/assets/80010233/17680652-f939-4fbd-954c-0c556064205d
I couldn't make cast_motion
normally work with the code from Godot 3 so I replaced DriveElement
logic with ShapeCast3D
as it now does some parts inplace of manually coded logic.
But overall the tracks tend to fall through in the new physics engine of Godot 4. For example, on jumps. Maybe adjusting DriveElement
physics parameters might help.
Also fixed broken meshes normals after migration for m113
https://github.com/Tobalation/GDCustomRaycastVehicle/assets/80010233/f5419188-b325-43a4-869a-8c19103f4fb3