Pong/Scenes/Paddle.tscn
Fries 02c5b90415 make a basic prototype for a scene.
right now theres just a moving ball, inside a box, with a working paddle. i had to make the ball kinematic and tell the ball to bounce when it hits the other direction.
2023-05-16 23:15:31 -07:00

22 lines
815 B
Text

[gd_scene load_steps=4 format=3 uid="uid://bklo6torhapa0"]
[ext_resource type="Script" path="res://Scripts/Paddle.cs" id="1_uv7s3"]
[ext_resource type="Texture2D" uid="uid://b186qihsjblv7" path="res://icon.svg" id="2_62eyv"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_r5a55"]
friction = 0.0
bounce = 1.0
[node name="Paddle" type="RigidBody2D"]
physics_material_override = SubResource("PhysicsMaterial_r5a55")
gravity_scale = 0.0
lock_rotation = true
script = ExtResource("1_uv7s3")
[node name="Sprite" type="Sprite2D" parent="."]
scale = Vector2(0.25, 2)
texture = ExtResource("2_62eyv")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
scale = Vector2(0.25, 2)
polygon = PackedVector2Array(64, -60.8, 64, 59, 59.6, 64, -60.1, 64, -64, 60.7, -64, -59, -59, -63.8, 59.1, -64)