From bf8bb6b88190740ca0dee9d5c8dc3fa785c8dce3 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 22 May 2024 09:32:30 +0200 Subject: [PATCH] feat: adjusted player collision model --- godot/car_player.tscn | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/godot/car_player.tscn b/godot/car_player.tscn index 9602b67..05bc27d 100644 --- a/godot/car_player.tscn +++ b/godot/car_player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://dkvgi7x2epurk"] +[gd_scene load_steps=12 format=3 uid="uid://dkvgi7x2epurk"] [ext_resource type="PackedScene" uid="uid://bm2mavtmnbaw1" path="res://Models/CarParts/SM_Veh_Hatch_01.fbx" id="1_tymeg"] [ext_resource type="PackedScene" uid="uid://bfq7ipx01ag7p" path="res://Models/CarParts/SM_Veh_Hatch_01_Bonnet_01.fbx" id="2_l8ox5"] @@ -20,11 +20,8 @@ friction = 0.0 rough = true absorbent = true -[sub_resource type="BoxShape3D" id="BoxShape3D_upk84"] -size = Vector3(2, 3.1515, 1.28965) - -[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ctfk0"] -radius = 0.613691 +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_4xe1s"] +points = PackedVector3Array(-1, -0.6, -2.11, 1, -0.6, -2.11, -1, -0.6, 1.405, 1, -0.6, 1.405, 0.76, -0.6, 2.065, -0.76, -0.6, 2.065, -0.74, 0.555, -1.74, 0.74, 0.555, -1.74, -0.665, 0.585, 0, 0.665, 0.585, 0, 0.665, -0.085, 1.88, -0.665, -0.085, 1.88) [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_p38n5"] radius = 0.48558 @@ -39,6 +36,7 @@ collision_mask = 3 mass = 1000.0 physics_material_override = SubResource("PhysicsMaterial_vwjm3") center_of_mass_mode = 1 +center_of_mass = Vector3(0, 0.2, 0) can_sleep = false custom_integrator = true continuous_cd = true @@ -52,16 +50,8 @@ transform = Transform3D(-1, -2.02334e-08, -8.50491e-08, -2.87879e-08, 0.994803, fov = 68.9128 [node name="Body" type="CollisionShape3D" parent="."] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.687824, 0.174572) -shape = SubResource("BoxShape3D_upk84") - -[node name="Front" type="CollisionShape3D" parent="."] -transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.698268, 1.75074) -shape = SubResource("CapsuleShape3D_ctfk0") - -[node name="Back" type="CollisionShape3D" parent="."] -transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.698268, -1.42338) -shape = SubResource("CapsuleShape3D_ctfk0") +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.687824, 0.174572) +shape = SubResource("ConvexPolygonShape3D_4xe1s") [node name="FrontWheels" type="CollisionShape3D" parent="."] transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.156071, 1.51353)