diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-06-06 04:25:06 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-06-06 04:25:19 +0200 |
| commit | abc27d4d6b590fbf6adb2fe136208df0ebe2deeb (patch) | |
| tree | e1cb6eccc8958a99b6432faf9d2fd459d30b589c | |
| parent | 3cb24b9d4d23b875cc7719c56cd4a664a9ec1b19 (diff) | |
Better handling, handbrake, follow camera
| -rw-r--r-- | ClippedCamera.gd | 16 | ||||
| -rw-r--r-- | Spatial.gd | 36 | ||||
| -rw-r--r-- | ball.tscn | 30 | ||||
| -rw-r--r-- | car.gd | 93 | ||||
| -rw-r--r-- | car.tscn | 159 | ||||
| -rw-r--r-- | game.gd | 9 | ||||
| -rw-r--r-- | game.tscn | 93 | ||||
| -rw-r--r-- | project.godot | 56 |
8 files changed, 364 insertions, 128 deletions
diff --git a/ClippedCamera.gd b/ClippedCamera.gd new file mode 100644 index 0000000..ccc8f13 --- /dev/null +++ b/ClippedCamera.gd @@ -0,0 +1,16 @@ +extends ClippedCamera + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + add_exception() + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Spatial.gd b/Spatial.gd new file mode 100644 index 0000000..e52e125 --- /dev/null +++ b/Spatial.gd @@ -0,0 +1,36 @@ +extends Spatial + +var direction = Vector3.FORWARD +var tx: int +var was_target + + +func _physics_process(delta): + var vel = get_parent().get_linear_velocity() + var target = get_parent().target + if target: + var target_pos = target.get_global_transform().origin + look_at(target_pos, Vector3.UP) + rotate_object_local(Vector3(0, 1, 0), PI) + rotation.x = clamp(rotation.x, 0, rotation.x) + + if not was_target: + pass + else: + vel.y = 0 + if abs(vel.x) > 1.0 or abs(vel.z) > 1.0: + direction = lerp(direction, -vel.normalized(), 0.5 * delta) + global_transform.basis = get_rotation_from_direction(direction) + + was_target = target + + +func get_rotation_from_direction(dir: Vector3) -> Basis: + dir = dir.normalized() + var x_axis = dir.cross(Vector3.UP) + return Basis(x_axis, Vector3.UP, -dir) + + +func _ready(): + $ClippedCamera.add_exception(get_parent()) + @@ -1,19 +1,31 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [sub_resource type="PhysicsMaterial" id=1] -bounce = 0.8 +bounce = 0.65 + +[sub_resource type="SpatialMaterial" id=3] +albedo_color = Color( 0.0705882, 0.0666667, 0.384314, 1 ) +metallic = 0.56 +metallic_specular = 1.0 +emission_enabled = true +emission = Color( 0, 0, 0, 1 ) +emission_energy = 1.0 +emission_operator = 0 +emission_on_uv2 = false [sub_resource type="SphereShape" id=2] -radius = 3.0 [node name="RigidBody" type="RigidBody"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 4 ) +mass = 36.0 physics_material_override = SubResource( 1 ) +continuous_cd = true + +[node name="CSGSphere" type="CSGSphere" parent="."] +transform = Transform( 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0 ) +radial_segments = 24 +rings = 24 +material = SubResource( 3 ) [node name="CollisionShape" type="CollisionShape" parent="."] +transform = Transform( 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0 ) shape = SubResource( 2 ) - -[node name="CSGSphere" type="CSGSphere" parent="."] -radius = 3.0 -radial_segments = 20 -rings = 20 @@ -1,36 +1,89 @@ extends VehicleBody -var max_rpm = 5000 -var max_torque = 800 +const max_rpm: float = 2500.0 +const max_torque: float = 2800.0 +var n_jumps: int +onready var wheels = [$front_left_wheel, $front_right_wheel, + $back_left_wheel, $back_right_wheel] +var slip +export(NodePath) var target = null -func _physics_process(delta): - var can_jump = false - for w in [$front_left_wheel, $front_right_wheel, - $back_left_wheel, $back_right_wheel]: +func car_can_jump() -> bool: + for w in wheels: + if not w.is_in_contact(): + return false + return true + +func is_car_flying() -> bool: + for w in wheels: if w.is_in_contact(): - can_jump = true - break + return false + return true + +func _physics_process(delta): + var can_jump = car_can_jump() + var is_flying = is_car_flying() + + if can_jump: + n_jumps = 0 var new_steering = (Input.get_action_strength("left") - - Input.get_action_strength("right")) * 0.4 + - Input.get_action_strength("right")) * 0.6 var acceleration = (Input.get_action_strength("forward") - Input.get_action_strength("back")) var transform = get_transform().basis + if Input.is_action_just_pressed("reset"): + rotation = Vector3(0, 0, 0) + angular_velocity = Vector3(0, 0, 0) + linear_velocity = Vector3(0, 0, 0) + get_global_transform().origin = Vector3(0, 0, 0) + if can_jump: - steering = lerp(steering, new_steering, 2 * delta) + if new_steering != 0: + steering = lerp(steering, new_steering, 2 * delta) + else: + steering = lerp(steering, 0, 8 * delta) + var rpm = $back_left_wheel.get_rpm() - $back_left_wheel.engine_force = acceleration * max_torque * (1 - rpm / max_rpm) + if (acceleration < 0 and rpm > 0) or (acceleration > 0 and rpm < 0): + for w in wheels: + w.brake = 25 + else: + for w in wheels: + w.brake = 0 + + $back_left_wheel.engine_force = acceleration * max_torque * (1 - rpm / max_rpm) rpm = $back_right_wheel.get_rpm() $back_right_wheel.engine_force = acceleration * max_torque * (1 - rpm / max_rpm) - if Input.is_action_just_pressed("jump"): - apply_impulse(Vector3(0, 0, 0), Vector3(0, 2000, 0)) - elif not can_jump: - steering = lerp(steering, 0, 5 * delta) - apply_torque_impulse(10.0 * acceleration * transform.x) - apply_torque_impulse(10.0 * new_steering * transform.y) + + if Input.is_action_pressed("toggle"): + # handbrake + $back_left_wheel.wheel_friction_slip = 1 + $back_right_wheel.wheel_friction_slip = 1 + for w in wheels: + w.brake = 10 + else: + $back_left_wheel.wheel_friction_slip = slip + $back_right_wheel.wheel_friction_slip = slip + for w in wheels: + w.brake = 0 + elif is_flying: + apply_torque_impulse(50.0 * acceleration * transform.x) + if Input.is_action_pressed("toggle"): + apply_torque_impulse(-100.0 * new_steering * transform.z) + else: + apply_torque_impulse(50.0 * new_steering * transform.y) + + if n_jumps < 2 and Input.is_action_just_pressed("jump"): + apply_impulse(Vector3(0, 0, 0), Vector3(0, 2000, 0)) + n_jumps += 1 + + if Input.is_action_pressed("turbo"): + add_central_force(4000 * transform.x) + func _ready(): - steering = 0 - $back_left_wheel.engine_force = 0 - $back_right_wheel.engine_force = 0 + for w in wheels: + add_collision_exception_with(w) + slip = $back_left_wheel.wheel_friction_slip @@ -1,93 +1,132 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://car.gd" type="Script" id=1] [ext_resource path="res://Spatial.gd" type="Script" id=2] +[ext_resource path="res://nimrud/nimrud.obj" type="ArrayMesh" id=3] +[ext_resource path="res://nimrud/wheel.obj" type="ArrayMesh" id=4] +[ext_resource path="res://nimrud/nimrud.png" type="Texture" id=5] -[sub_resource type="CubeMesh" id=1] -size = Vector3( 1.5, 0.5, 3 ) +[sub_resource type="SpatialMaterial" id=14] +albedo_texture = ExtResource( 5 ) +metallic = 0.44 -[sub_resource type="ConvexPolygonShape" id=2] -points = PoolVector3Array( -0.7225, -0.25, -1.43083, -0.7225, -0.25, 1.43083, -0.694167, 0.25, -1.37472, -0.694167, 0.25, 1.37472, 0.694167, 0.25, -1.37472, 0.694167, 0.25, 1.37472, 0.7225, -0.25, -1.43083, 0.7225, -0.25, 1.43083 ) +[sub_resource type="ConvexPolygonShape" id=18] +points = PoolVector3Array( -1.13796, 2.68186, 0.956256, 1.71697, 3.50819, 0.129863, -1.73953, 3.50819, 0.129863, 0.8487, 2.62735, 0.148826, 1.54339, 2.63334, 0.861018, -1.06318, 3.50819, 0.805863, -1.73953, 2.60667, 0.430326, 1.64118, 3.35789, 0.805863, 1.71697, 2.60667, 0.430326, -1.58897, 3.35789, 0.805863, -0.8606, 2.63268, 0.153711, 0.739841, 2.90726, 0.956256, 1.04063, 3.50819, 0.805863, 1.1154, 2.60667, 0.956256, -1.50403, 2.63093, 0.862824, 1.64118, 3.05738, 0.881019, -1.58897, 3.05738, 0.881019, -1.58897, 3.50819, 0.730707, -1.13796, 2.60667, 0.956256, 1.56641, 3.50819, 0.730707, -0.987733, 3.20759, 0.881019, -1.73953, 3.43299, 0.129863, 1.71697, 3.43299, 0.129863, -0.987733, 2.75696, 0.956256 ) -[sub_resource type="CylinderMesh" id=3] -top_radius = 0.4 -bottom_radius = 0.4 -height = 0.25 -radial_segments = 12 +[sub_resource type="ConvexPolygonShape" id=19] +points = PoolVector3Array( 1.11904, 0.846649, 1.50608, -1.73953, -2.65332, 0.355464, -1.60043, -2.50534, 0.661949, 1.79211, -2.65332, 0.355464, -0.161421, 1.10375, -0.546571, -1.20401, 0.983175, 1.36364, 0.0636276, -1.97663, 2.00823, 1.70892, 1.09505, -0.465482, -1.63078, -1.55025, -0.4679, -1.70196, 1.06378, -0.445476, 1.416, -2.35249, -0.321, 0.851211, -2.56856, 1.73521, -0.864973, -2.55798, 1.72928, -0.9219, 0.208148, 1.7845, 1.69242, -1.55449, -0.474217, -0.150249, 0.991942, 1.72006, 1.48381, 1.00305, 0.872836, -1.43877, -2.42751, -0.245726, 0.903194, 0.27689, 1.78287, -1.64933, 1.0078, 0.303445, 0.2761, -2.34622, -0.411935, 1.10494, -2.51459, 1.49607, 0.8487, -2.5631, -0.127167, 1.56054, 0.652367, 0.802085, -1.53675, 0.128032, 0.800201, -1.13981, -2.54232, 1.43768, 0.98489, 1.00063, 1.58288, 1.70697, 0.512281, 0.158868, -1.00112, 0.997033, 1.58115, 0.200502, 0.759394, 1.77686, 1.65964, -1.53915, 0.661437, -0.921046, -1.19556, 1.78355, 0.900943, -1.26417, 1.78018, -1.43877, -2.35249, -0.321, 1.04244, 0.557007, 1.64181, -0.430149, 0.630361, 1.78478, -0.8606, -2.54923, -0.120516, -1.58413, -0.911289, 0.730832, -0.98813, -1.33406, 1.71037, -1.47824, 0.974774, 0.870577, -0.011043, -1.97663, 2.00823, 1.61832, 0.994371, 0.447975, -0.0791468, -1.82869, -0.4643, 1.68809, -2.54265, 0.589624, 1.0379, -1.05348, 1.63775, 0.971817, -1.96545, 1.71113, -0.853881, 0.704217, 1.71686, -0.990762, 0.417757, 1.71291, 0.912394, 0.642853, 1.7229, 1.416, -2.42751, -0.245726, -0.921546, -2.45947, 1.71377, 0.551835, 0.557557, 1.78269, 1.61615, -0.421641, 0.730832, 1.71693, 0.519908, -0.419875, -1.62067, 0.0659307, -0.460586, 0.910342, -2.5429, 1.7206, -0.148346, 0.763164, 1.77943, 1.25308, 0.978156, 1.29159, 0.201111, 0.974711, 1.71041, 0.275374, -2.41278, -0.337725 ) -[sub_resource type="SpatialMaterial" id=4] -albedo_color = Color( 0.156863, 0.160784, 0.290196, 1 ) +[sub_resource type="ConvexPolygonShape" id=20] +points = PoolVector3Array( 0.965552, -2.80364, 1.78281, -1.73953, -2.95389, -0.471429, 1.79211, -2.95389, -0.471429, 0.664795, -3.47987, 0.355155, -0.611865, -3.10405, 1.78281, -1.73953, -2.65332, 0.280131, -1.43843, -3.40471, 0.280131, 1.79211, -2.65332, 0.280131, 0.965552, -3.40471, -0.471429, -0.868133, -2.67304, 1.72901, 1.41634, -3.2543, 0.805738, 0.841425, -2.67664, -0.124027, 0.589779, -3.10405, 1.78281, -1.28805, -3.02913, 1.25676, -1.21303, -3.2543, -0.471429, -0.912967, -3.47987, 0.280131, 1.41634, -3.40471, 0.280131, 0.904357, -2.68024, 1.70938, -0.859948, -2.67664, -0.124027, -1.063, -3.40471, -0.170673, -1.36341, -3.2543, 0.880762, -1.21303, -2.87889, 1.48205, 1.26596, -2.95389, 1.33179, 1.71675, -3.10405, -0.471429, -0.912967, -2.95389, 1.78281, -1.43843, -3.32954, -0.245917, -1.51379, -3.32954, 0.280131, -0.686881, -3.47987, 0.355155, 0.89019, -3.47987, 0.204887, 0.89019, -2.95389, 1.78281, 1.49136, -3.32954, -0.170673, 1.49136, -3.32954, 0.355155, -1.14299, -2.67667, 1.43535, -0.912967, -3.47987, 0.204887, 1.69739, -2.67549, 0.513693, -1.51379, -3.32954, -0.0956491, 1.34098, -3.1793, 1.03103, 0.89019, -3.47987, 0.280131, 1.34098, -3.2543, 0.880762, 1.10601, -2.68346, 1.49155, 1.19095, -2.87889, 1.48205, -1.58626, -2.68919, 0.655691, -1.43843, -3.2543, -0.396185, 1.34098, -3.10405, 1.10627, 1.49136, -3.2543, -0.396185 ) + +[sub_resource type="ConvexPolygonShape" id=21] +points = PoolVector3Array( 1.1154, 4.25958, 0.430112, -1.73953, 3.58356, -0.546571, -1.51352, 3.50836, 0.730832, 1.71697, 3.50836, -0.0205298, -0.721215, 4.34644, -0.456672, 1.30458, 4.16686, -0.496632, -0.83751, 4.33469, 0.430112, 1.56641, 3.50836, 0.730832, 1.71697, 3.58356, -0.546571, 1.26596, 4.33469, 0.279815, -1.24301, 4.23285, 0.194655, 0.890065, 3.73385, 0.730832, -1.261, 4.23685, -0.498248, -1.73953, 3.50836, -0.0205298, 0.756218, 4.34295, -0.451726, -0.912621, 3.73385, 0.730832, 0.890065, 4.33469, 0.430112, -1.51352, 3.58356, 0.730832, 1.56641, 3.58356, 0.730832, 1.1323, 4.29539, -0.479733, -1.21307, 4.10929, 0.505261, -1.14585, 4.29274, -0.475228, -1.13796, 4.03418, 0.58041, 1.1154, 4.03418, 0.58041, 0.753222, 4.34145, 0.187581, -1.13849, 4.29057, 0.191447, 1.26596, 4.10929, 0.505261, -1.59879, 3.7522, -0.0803843 ) + +[sub_resource type="ConvexPolygonShape" id=22] +points = PoolVector3Array( -0.160973, 1.10375, -0.546571, -0.160973, 2.38107, -0.546571, -1.81467, 1.25409, 1.25669, 1.50598, 2.57775, 0.868092, 1.70742, 1.10788, -0.465494, -1.73947, 2.60658, 0.430568, -1.70117, 1.1204, -0.448589, 1.06113, 1.14012, 1.50815, -1.28827, 2.60658, 0.956146, 1.71691, 2.1557, -0.471062, 1.79211, 1.25409, 1.25669, -1.73947, 2.1557, -0.471062, 1.71691, 2.60658, 0.430568, -1.06452, 1.15267, 1.4912, -0.0798763, 2.5471, -0.3908, 1.34127, 2.60658, 0.956146, 1.19087, 1.40443, 1.48215, -1.81467, 1.47946, 1.25669, 1.79211, 1.47946, 1.25669, -0.759448, 1.17496, 1.52927, -1.51387, 2.53141, 0.956146, 1.49934, 1.13574, 0.866671, 1.56651, 2.45624, 0.956146, -1.49941, 1.14645, 0.861851, 1.79211, 1.40443, 0.956146, -1.81467, 1.32926, 0.956146, 0.803347, 2.53402, -0.101814, -0.397099, 1.33998, 1.47684, -1.73947, 1.55463, 1.25669, 0.73942, 1.17266, 1.53261, -1.81467, 1.47946, 1.03123, 1.49131, 2.53141, 0.956146 ) [node name="car" type="VehicleBody"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00634003, 0 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.757732, 0 ) mass = 200.0 script = ExtResource( 1 ) [node name="car_body" type="MeshInstance" parent="."] -mesh = SubResource( 1 ) -material/0 = null +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +mesh = ExtResource( 3 ) +material/0 = SubResource( 14 ) + +[node name="CollisionShape6" type="CollisionShape" parent="."] +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +shape = SubResource( 18 ) + +[node name="CollisionShape5" type="CollisionShape" parent="."] +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +shape = SubResource( 19 ) + +[node name="CollisionShape4" type="CollisionShape" parent="."] +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +shape = SubResource( 20 ) -[node name="CollisionShape" type="CollisionShape" parent="."] -shape = SubResource( 2 ) +[node name="CollisionShape3" type="CollisionShape" parent="."] +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +shape = SubResource( 21 ) + +[node name="CollisionShape2" type="CollisionShape" parent="."] +transform = Transform( -1, 3.25841e-07, 5.30863e-14, 0, -1.62921e-07, 1, 3.25841e-07, 1, 1.62921e-07, 0, 1.28304, 0 ) +shape = SubResource( 22 ) + +[node name="back_left_wheel" type="VehicleWheel" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.45591, 1.12444, -2.301 ) +use_as_traction = true +wheel_roll_influence = 0.0 +wheel_radius = 0.6 +wheel_friction_slip = 15.0 +suspension_travel = 0.3 +suspension_stiffness = 100.0 +suspension_max_force = 60000.0 +damping_compression = 2.0 +damping_relaxation = 3.0 + +[node name="MeshInstance" type="MeshInstance" parent="back_left_wheel"] +transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0, 0, 0 ) +mesh = ExtResource( 4 ) +material/0 = null [node name="front_left_wheel" type="VehicleWheel" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1 ) -engine_force = 1.0 +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.45591, 1.12444, 2.85433 ) use_as_steering = true -wheel_radius = 0.4 -suspension_stiffness = 50.0 -damping_compression = 1.9 -damping_relaxation = 2.0 +wheel_roll_influence = 0.0 +wheel_radius = 0.6 +wheel_friction_slip = 8.0 +suspension_travel = 0.3 +suspension_stiffness = 100.0 +suspension_max_force = 60000.0 +damping_compression = 2.0 +damping_relaxation = 3.0 [node name="MeshInstance" type="MeshInstance" parent="front_left_wheel"] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 0, 0 ) -mesh = SubResource( 3 ) -material/0 = SubResource( 4 ) +transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0, 0, 0 ) +mesh = ExtResource( 4 ) +material/0 = null [node name="front_right_wheel" type="VehicleWheel" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 1 ) -engine_force = 1.0 +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.444, 1.12427, 2.854 ) use_as_steering = true -wheel_radius = 0.4 -suspension_stiffness = 50.0 -damping_compression = 1.9 -damping_relaxation = 2.0 +wheel_roll_influence = 0.0 +wheel_radius = 0.6 +wheel_friction_slip = 8.0 +suspension_travel = 0.3 +suspension_stiffness = 100.0 +suspension_max_force = 60000.0 +damping_compression = 2.0 +damping_relaxation = 3.0 [node name="MeshInstance" type="MeshInstance" parent="front_right_wheel"] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 0, 0 ) -mesh = SubResource( 3 ) -material/0 = SubResource( 4 ) - -[node name="back_left_wheel" type="VehicleWheel" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, -1 ) -engine_force = 0.125 -use_as_traction = true -wheel_radius = 0.4 -suspension_stiffness = 50.0 -damping_compression = 1.9 -damping_relaxation = 2.0 - -[node name="MeshInstance" type="MeshInstance" parent="back_left_wheel"] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 0, 0 ) -mesh = SubResource( 3 ) -material/0 = SubResource( 4 ) +transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0, 0, 0 ) +mesh = ExtResource( 4 ) +material/0 = null [node name="back_right_wheel" type="VehicleWheel" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, -1 ) -engine_force = 6.16571e-44 +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.44361, 1.12444, -2.301 ) use_as_traction = true -wheel_radius = 0.4 -suspension_stiffness = 50.0 -damping_compression = 1.9 -damping_relaxation = 2.0 +wheel_roll_influence = 0.0 +wheel_radius = 0.6 +wheel_friction_slip = 15.0 +suspension_travel = 0.3 +suspension_stiffness = 100.0 +suspension_max_force = 60000.0 +damping_compression = 2.0 +damping_relaxation = 3.0 [node name="MeshInstance" type="MeshInstance" parent="back_right_wheel"] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 0, 0 ) -mesh = SubResource( 3 ) -material/0 = SubResource( 4 ) +transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0, 0, 0 ) +mesh = ExtResource( 4 ) +material/0 = null [node name="Spatial" type="Spatial" parent="."] +transform = Transform( 1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 1.17638, 0 ) script = ExtResource( 2 ) -[node name="Camera" type="Camera" parent="Spatial"] -transform = Transform( -1, 3.10202e-08, -8.17343e-08, 9.25045e-09, 0.967228, 0.25391, 8.6932e-08, 0.25391, -0.967228, 0, 2, -7.21412 ) +[node name="ClippedCamera" type="ClippedCamera" parent="Spatial"] +transform = Transform( -1, -3.72773e-08, -9.14428e-08, -5.59159e-08, 0.977008, 0.213201, 8.13928e-08, 0.213201, -0.977008, 2.71887e-06, 5.92579, -15.5501 ) +far = 400.0 @@ -0,0 +1,9 @@ +extends Spatial + + +func _input(delta): + if Input.is_action_just_pressed("camera-toggle"): + if $car.target: + $car.target = null + else: + $car.target = $ball @@ -1,74 +1,103 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://car.tscn" type="PackedScene" id=1] [ext_resource path="res://ball.tscn" type="PackedScene" id=2] +[ext_resource path="res://grass_24.bmp" type="Texture" id=3] +[ext_resource path="res://game.gd" type="Script" id=4] -[sub_resource type="CubeMesh" id=1] -size = Vector3( 25, 1, 100 ) +[sub_resource type="CubeMesh" id=16] +size = Vector3( 45, 2, 300 ) + +[sub_resource type="ConcavePolygonShape" id=18] +data = PoolVector3Array( -22.5, 1, 150, 22.5, 1, 150, -22.5, -1, 150, 22.5, 1, 150, 22.5, -1, 150, -22.5, -1, 150, 22.5, 1, -150, -22.5, 1, -150, 22.5, -1, -150, -22.5, 1, -150, -22.5, -1, -150, 22.5, -1, -150, 22.5, 1, 150, 22.5, 1, -150, 22.5, -1, 150, 22.5, 1, -150, 22.5, -1, -150, 22.5, -1, 150, -22.5, 1, -150, -22.5, 1, 150, -22.5, -1, -150, -22.5, 1, 150, -22.5, -1, 150, -22.5, -1, -150, 22.5, 1, 150, -22.5, 1, 150, 22.5, 1, -150, -22.5, 1, 150, -22.5, 1, -150, 22.5, 1, -150, -22.5, -1, 150, 22.5, -1, 150, -22.5, -1, -150, 22.5, -1, 150, 22.5, -1, -150, -22.5, -1, -150 ) + +[sub_resource type="SpatialMaterial" id=23] +flags_transparent = true + +[sub_resource type="CubeMesh" id=22] +material = SubResource( 23 ) +size = Vector3( 2, 200, 300 ) -[sub_resource type="ConcavePolygonShape" id=2] -data = PoolVector3Array( -12.5, 0.5, 25, 12.5, 0.5, 25, -12.5, -0.5, 25, 12.5, 0.5, 25, 12.5, -0.5, 25, -12.5, -0.5, 25, 12.5, 0.5, -25, -12.5, 0.5, -25, 12.5, -0.5, -25, -12.5, 0.5, -25, -12.5, -0.5, -25, 12.5, -0.5, -25, 12.5, 0.5, 25, 12.5, 0.5, -25, 12.5, -0.5, 25, 12.5, 0.5, -25, 12.5, -0.5, -25, 12.5, -0.5, 25, -12.5, 0.5, -25, -12.5, 0.5, 25, -12.5, -0.5, -25, -12.5, 0.5, 25, -12.5, -0.5, 25, -12.5, -0.5, -25, 12.5, 0.5, 25, -12.5, 0.5, 25, 12.5, 0.5, -25, -12.5, 0.5, 25, -12.5, 0.5, -25, 12.5, 0.5, -25, -12.5, -0.5, 25, 12.5, -0.5, 25, -12.5, -0.5, -25, 12.5, -0.5, 25, 12.5, -0.5, -25, -12.5, -0.5, -25 ) +[sub_resource type="ConcavePolygonShape" id=24] +data = PoolVector3Array( -1, 100, 150, 1, 100, 150, -1, -100, 150, 1, 100, 150, 1, -100, 150, -1, -100, 150, 1, 100, -150, -1, 100, -150, 1, -100, -150, -1, 100, -150, -1, -100, -150, 1, -100, -150, 1, 100, 150, 1, 100, -150, 1, -100, 150, 1, 100, -150, 1, -100, -150, 1, -100, 150, -1, 100, -150, -1, 100, 150, -1, -100, -150, -1, 100, 150, -1, -100, 150, -1, -100, -150, 1, 100, 150, -1, 100, 150, 1, 100, -150, -1, 100, 150, -1, 100, -150, 1, 100, -150, -1, -100, 150, 1, -100, 150, -1, -100, -150, 1, -100, 150, 1, -100, -150, -1, -100, -150 ) -[sub_resource type="ConcavePolygonShape" id=3] -data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 ) +[sub_resource type="CubeMesh" id=14] +size = Vector3( 45, 2, 300 ) + +[sub_resource type="ConcavePolygonShape" id=19] +data = PoolVector3Array( -22.5, 1, 150, 22.5, 1, 150, -22.5, -1, 150, 22.5, 1, 150, 22.5, -1, 150, -22.5, -1, 150, 22.5, 1, -150, -22.5, 1, -150, 22.5, -1, -150, -22.5, 1, -150, -22.5, -1, -150, 22.5, -1, -150, 22.5, 1, 150, 22.5, 1, -150, 22.5, -1, 150, 22.5, 1, -150, 22.5, -1, -150, 22.5, -1, 150, -22.5, 1, -150, -22.5, 1, 150, -22.5, -1, -150, -22.5, 1, 150, -22.5, -1, 150, -22.5, -1, -150, 22.5, 1, 150, -22.5, 1, 150, 22.5, 1, -150, -22.5, 1, 150, -22.5, 1, -150, 22.5, 1, -150, -22.5, -1, 150, 22.5, -1, 150, -22.5, -1, -150, 22.5, -1, 150, 22.5, -1, -150, -22.5, -1, -150 ) + +[sub_resource type="CubeMesh" id=1] +size = Vector3( 45, 1, 200 ) -[sub_resource type="ConcavePolygonShape" id=4] -data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 ) +[sub_resource type="ConcavePolygonShape" id=20] +data = PoolVector3Array( -22.5, 0.5, 100, 22.5, 0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, -100, 22.5, -0.5, -100, -22.5, 0.5, -100, -22.5, -0.5, -100, 22.5, -0.5, -100, 22.5, 0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, -100, 22.5, -0.5, 100, -22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, 0.5, 100, -22.5, 0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, 0.5, -100, 22.5, 0.5, -100, -22.5, -0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, -0.5, 100, 22.5, -0.5, -100, -22.5, -0.5, -100 ) -[sub_resource type="ConcavePolygonShape" id=5] -data = PoolVector3Array( -12.5, 0.5, 50, 12.5, 0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, -50, 12.5, -0.5, -50, -12.5, 0.5, -50, -12.5, -0.5, -50, 12.5, -0.5, -50, 12.5, 0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, 50, 12.5, 0.5, -50, 12.5, -0.5, -50, 12.5, -0.5, 50, -12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, -50, -12.5, 0.5, 50, -12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, 0.5, 50, -12.5, 0.5, 50, 12.5, 0.5, -50, -12.5, 0.5, 50, -12.5, 0.5, -50, 12.5, 0.5, -50, -12.5, -0.5, 50, 12.5, -0.5, 50, -12.5, -0.5, -50, 12.5, -0.5, 50, 12.5, -0.5, -50, -12.5, -0.5, -50 ) +[sub_resource type="ConcavePolygonShape" id=21] +data = PoolVector3Array( -22.5, 0.5, 100, 22.5, 0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, -100, 22.5, -0.5, -100, -22.5, 0.5, -100, -22.5, -0.5, -100, 22.5, -0.5, -100, 22.5, 0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, 100, 22.5, 0.5, -100, 22.5, -0.5, -100, 22.5, -0.5, 100, -22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, -100, -22.5, 0.5, 100, -22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, 0.5, 100, -22.5, 0.5, 100, 22.5, 0.5, -100, -22.5, 0.5, 100, -22.5, 0.5, -100, 22.5, 0.5, -100, -22.5, -0.5, 100, 22.5, -0.5, 100, -22.5, -0.5, -100, 22.5, -0.5, 100, 22.5, -0.5, -100, -22.5, -0.5, -100 ) -[sub_resource type="SpatialMaterial" id=6] -albedo_color = Color( 0.298039, 0.235294, 0.235294, 1 ) +[sub_resource type="SpatialMaterial" id=13] +albedo_texture = ExtResource( 3 ) [sub_resource type="CubeMesh" id=7] -material = SubResource( 6 ) -size = Vector3( 100, 1, 100 ) +material = SubResource( 13 ) +size = Vector3( 200, 1, 300 ) -[sub_resource type="ConcavePolygonShape" id=8] -data = PoolVector3Array( -50, 0.5, 50, 50, 0.5, 50, -50, -0.5, 50, 50, 0.5, 50, 50, -0.5, 50, -50, -0.5, 50, 50, 0.5, -50, -50, 0.5, -50, 50, -0.5, -50, -50, 0.5, -50, -50, -0.5, -50, 50, -0.5, -50, 50, 0.5, 50, 50, 0.5, -50, 50, -0.5, 50, 50, 0.5, -50, 50, -0.5, -50, 50, -0.5, 50, -50, 0.5, -50, -50, 0.5, 50, -50, -0.5, -50, -50, 0.5, 50, -50, -0.5, 50, -50, -0.5, -50, 50, 0.5, 50, -50, 0.5, 50, 50, 0.5, -50, -50, 0.5, 50, -50, 0.5, -50, 50, 0.5, -50, -50, -0.5, 50, 50, -0.5, 50, -50, -0.5, -50, 50, -0.5, 50, 50, -0.5, -50, -50, -0.5, -50 ) +[sub_resource type="ConcavePolygonShape" id=17] +data = PoolVector3Array( -100, 0.5, 150, 100, 0.5, 150, -100, -0.5, 150, 100, 0.5, 150, 100, -0.5, 150, -100, -0.5, 150, 100, 0.5, -150, -100, 0.5, -150, 100, -0.5, -150, -100, 0.5, -150, -100, -0.5, -150, 100, -0.5, -150, 100, 0.5, 150, 100, 0.5, -150, 100, -0.5, 150, 100, 0.5, -150, 100, -0.5, -150, 100, -0.5, 150, -100, 0.5, -150, -100, 0.5, 150, -100, -0.5, -150, -100, 0.5, 150, -100, -0.5, 150, -100, -0.5, -150, 100, 0.5, 150, -100, 0.5, 150, 100, 0.5, -150, -100, 0.5, 150, -100, 0.5, -150, 100, 0.5, -150, -100, -0.5, 150, 100, -0.5, 150, -100, -0.5, -150, 100, -0.5, 150, 100, -0.5, -150, -100, -0.5, -150 ) [node name="game" type="Spatial"] +script = ExtResource( 4 ) [node name="MeshInstance" type="MeshInstance" parent="."] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 50.3668, 11.7884, -0.881386 ) -mesh = SubResource( 1 ) +transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 100, 23, 0 ) +mesh = SubResource( 16 ) material/0 = null [node name="StaticBody" type="StaticBody" parent="MeshInstance"] [node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"] -shape = SubResource( 2 ) +shape = SubResource( 18 ) + +[node name="MeshInstance5" type="MeshInstance" parent="."] +transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, 0, 45, 0 ) +mesh = SubResource( 22 ) +material/0 = null + +[node name="StaticBody" type="StaticBody" parent="MeshInstance5"] + +[node name="CollisionShape" type="CollisionShape" parent="MeshInstance5/StaticBody"] +shape = SubResource( 24 ) [node name="MeshInstance4" type="MeshInstance" parent="."] -transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, -49.5117, 12, -1 ) -mesh = SubResource( 1 ) +transform = Transform( -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0, 1, -100, 23, -1 ) +mesh = SubResource( 14 ) material/0 = null [node name="StaticBody" type="StaticBody" parent="MeshInstance4"] [node name="CollisionShape" type="CollisionShape" parent="MeshInstance4/StaticBody"] -shape = SubResource( 3 ) +shape = SubResource( 19 ) [node name="MeshInstance2" type="MeshInstance" parent="."] -transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0.488319, 12, -50.4671 ) +transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0, 23, -150 ) mesh = SubResource( 1 ) material/0 = null [node name="StaticBody" type="StaticBody" parent="MeshInstance2"] [node name="CollisionShape" type="CollisionShape" parent="MeshInstance2/StaticBody"] -shape = SubResource( 4 ) +shape = SubResource( 20 ) [node name="MeshInstance3" type="MeshInstance" parent="."] -transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0.488319, 12, 49 ) +transform = Transform( 7.12149e-15, 4.37114e-08, -1, 1, -1.62921e-07, 0, -1.62921e-07, -1, -4.37114e-08, 0, 23, 150 ) mesh = SubResource( 1 ) material/0 = null [node name="StaticBody" type="StaticBody" parent="MeshInstance3"] [node name="CollisionShape" type="CollisionShape" parent="MeshInstance3/StaticBody"] -shape = SubResource( 5 ) +shape = SubResource( 21 ) [node name="ground" type="MeshInstance" parent="."] mesh = SubResource( 7 ) @@ -77,9 +106,15 @@ material/0 = null [node name="StaticBody" type="StaticBody" parent="ground"] [node name="CollisionShape" type="CollisionShape" parent="ground/StaticBody"] -shape = SubResource( 8 ) +shape = SubResource( 17 ) [node name="car" parent="." instance=ExtResource( 1 )] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.00634, -4 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4 ) +continuous_cd = true [node name="ball" parent="." instance=ExtResource( 2 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.05547, 6.1003 ) + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, -0.534087, 0.84543, 0, -0.84543, -0.534087, -45.9835, 32.3876, 38.4155 ) +shadow_enabled = true diff --git a/project.godot b/project.godot index 5d69646..f16ac03 100644 --- a/project.godot +++ b/project.godot @@ -10,7 +10,6 @@ config_version=4 _global_script_classes=[ ] _global_script_class_icons={ - } [application] @@ -19,35 +18,70 @@ config/name="car" run/main_scene="res://game.tscn" config/icon="res://icon.png" +[debug] + +gdscript/warnings/unsafe_property_access=true +gdscript/warnings/unsafe_method_access=true +gdscript/warnings/unsafe_cast=true +gdscript/warnings/unsafe_call_argument=true + +[display] + +window/size/fullscreen=true + +[gui] + +theme/use_hidpi=true + [input] forward={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } back={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } left={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } right={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } jump={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} +turbo={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777238,"unicode":0,"echo":false,"script":null) + ] +} +reset={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":67,"unicode":0,"echo":false,"script":null) + ] +} +toggle={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777237,"unicode":0,"echo":false,"script":null) + ] +} +camera-toggle={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777240,"unicode":0,"echo":false,"script":null) ] } @@ -56,4 +90,6 @@ jump={ quality/driver/driver_name="GLES2" vram_compression/import_etc=true vram_compression/import_etc2=false +quality/shading/force_vertex_shading=true +quality/depth/hdr=false environment/default_environment="res://default_env.tres" |
