[gd_scene load_steps=12 format=3 uid="uid://bxx2ftwccdlft"] [ext_resource type="Script" path="res://tests/functional/test_character_pixels.gd" id="1"] [ext_resource type="Script" path="res://utils/rigidbody_controller.gd" id="2"] [ext_resource type="PackedScene" uid="uid://blh3twy74kbkv" path="res://tests/test_options.tscn" id="3"] [ext_resource type="PackedScene" uid="uid://cx2q80okt25o1" path="res://tests/static_scene_flat.tscn" id="4"] [ext_resource type="Script" path="res://utils/characterbody_controller.gd" id="7"] [sub_resource type="RectangleShape2D" id="3"] size = Vector2(6, 9.8) [sub_resource type="RectangleShape2D" id="RectangleShape2D_scs3g"] size = Vector2(6, 4.8) [sub_resource type="SeparationRayShape2D" id="SeparationRayShape2D_vby12"] length = 7.0 [sub_resource type="PhysicsMaterial" id="1"] friction = 0.0 [sub_resource type="RectangleShape2D" id="2"] size = Vector2(6, 10) [sub_resource type="RectangleShape2D" id="6"] size = Vector2(20, 4) [node name="Test" type="Node2D"] script = ExtResource( "1" ) _motion_speed = 30.0 _gravity_force = 2.0 _jump_force = 50.0 _snap_distance = 1.0 [node name="ViewportContainer" type="SubViewportContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 offset_right = 1024.0 offset_bottom = 600.0 size_flags_horizontal = 3 size_flags_vertical = 3 stretch = true __meta__ = { "_edit_use_anchors_": false } [node name="Viewport" type="SubViewport" parent="ViewportContainer"] handle_input_locally = false size = Vector2i(1024, 600) size_2d_override = Vector2i(128, 75) size_2d_override_stretch = true render_target_update_mode = 4 [node name="StaticSceneFlat" parent="ViewportContainer/Viewport" instance=ExtResource( "4" )] position = Vector2(0, -450) [node name="CharacterBody2D" type="CharacterBody2D" parent="ViewportContainer/Viewport"] position = Vector2(30, 40) collision_mask = 2147483649 script = ExtResource( "7" ) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBody2D"] shape = SubResource( "3" ) [node name="CharacterBodyRay2D" type="CharacterBody2D" parent="ViewportContainer/Viewport"] position = Vector2(30, 40) collision_mask = 2147483649 script = ExtResource( "7" ) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBodyRay2D"] position = Vector2(0, -2.5) shape = SubResource( "RectangleShape2D_scs3g" ) [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBodyRay2D"] position = Vector2(0, -2) shape = SubResource( "SeparationRayShape2D_vby12" ) [node name="RigidDynamicBody2D" type="RigidDynamicBody2D" parent="ViewportContainer/Viewport"] position = Vector2(30, 40) collision_mask = 2147483649 physics_material_override = SubResource( "1" ) contacts_reported = 4 contact_monitor = true lock_rotation = true script = ExtResource( "2" ) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidDynamicBody2D"] shape = SubResource( "2" ) [node name="RigidBodyRay2D" type="RigidDynamicBody2D" parent="ViewportContainer/Viewport"] position = Vector2(30, 40) collision_mask = 2147483649 physics_material_override = SubResource( "1" ) contacts_reported = 4 contact_monitor = true lock_rotation = true script = ExtResource( "2" ) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidBodyRay2D"] position = Vector2(0, -2.5) shape = SubResource( "RectangleShape2D_scs3g" ) [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidBodyRay2D"] position = Vector2(0, -2) shape = SubResource( "SeparationRayShape2D_vby12" ) [node name="Wall1" type="StaticBody2D" parent="ViewportContainer/Viewport"] position = Vector2(20, 40) [node name="CollisionShape2D" type="CollisionShape2D" parent="SubViewportContainer/SubViewport/Wall1"] rotation = 1.5708 shape = SubResource( "6" ) [node name="Wall2" type="StaticBody2D" parent="ViewportContainer/Viewport"] position = Vector2(122, 40) [node name="CollisionShape2D" type="CollisionShape2D" parent="SubViewportContainer/SubViewport/Wall2"] rotation = 1.5708 shape = SubResource( "6" ) [node name="Platform1" type="StaticBody2D" parent="ViewportContainer/Viewport"] position = Vector2(50, 44) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/Platform1"] shape = SubResource( "6" ) one_way_collision = true [node name="Platform2" type="StaticBody2D" parent="ViewportContainer/Viewport"] position = Vector2(80, 38) [node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/Platform2"] shape = SubResource( "6" ) [node name="Slope" type="StaticBody2D" parent="ViewportContainer/Viewport"] position = Vector2(85, 36) [node name="CollisionShape2D" type="CollisionPolygon2D" parent="ViewportContainer/Viewport/Slope"] polygon = PackedVector2Array(0, 0, 6, 0, 22, 16, 16, 16) [node name="LabelTestType" type="Label" parent="."] offset_left = 14.0 offset_top = 79.0 offset_right = 145.0 offset_bottom = 93.0 text = "Testing: " __meta__ = { "_edit_use_anchors_": false } [node name="Options" parent="." instance=ExtResource( "3" )] [node name="LabelFloor" type="Label" parent="."] offset_left = 14.0 offset_top = 237.929 offset_right = 145.0 offset_bottom = 251.929 text = "ON FLOOR" __meta__ = { "_edit_use_anchors_": false } [node name="LabelControls" type="Label" parent="."] offset_left = 14.0 offset_top = 263.291 offset_right = 145.0 offset_bottom = 294.291 text = "LEFT/RIGHT - MOVE UP - JUMP" __meta__ = { "_edit_use_anchors_": false }