1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 08:04:23 +00:00
hella-farm/behaviours/draggable.tscn
Stefano Pigozzi 3d17dcd3f0
Make Sheeps Draggable with a CursorMagnet
Throwing and drag isn't implemented yet. Any ideas for how to do it with this framework?
Might be a good idea to do it on a branch first...
2024-04-14 07:46:06 +02:00

20 lines
740 B
Text

[gd_scene load_steps=4 format=3 uid="uid://dijcjahkddudv"]
[ext_resource type="Script" path="res://behaviours/draggable.gd" id="1_hdedq"]
[ext_resource type="PackedScene" uid="uid://bvrxvrjlo5130" path="res://behaviours/move_towards_mouse.tscn" id="2_gi6xd"]
[sub_resource type="CircleShape2D" id="CircleShape2D_vkph8"]
radius = 8.0
[node name="Draggable" type="Area2D"]
script = ExtResource("1_hdedq")
[node name="Shape" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_vkph8")
debug_color = Color(1, 1, 1, 0)
[node name="MatchMousePosition" parent="." instance=ExtResource("2_gi6xd")]
scale = Vector2(10000, 10000)
speed = 100000.0
[connection signal="move" from="MatchMousePosition" to="." method="_on_move"]