Godot Version
4.6
Question
Hiiiiiii! This is a very weird quiestion lol.
You know how you can glue two things together with a gluestick? Well, i got my game set up where you can drag all he objects i want the player to be able to drag around the 2d area. But i want to make it so that if those bodies are colliding, the player can take the (lets say) gluestick and stick them together, but not have the two things stick together without that gluestick. But i also dont want the player to be able to just put random things together. Any ideas?
Draggable script:
extends StaticBody2D
var dragging = false
var of = Vector2(0,0)
func _process(delta):
if dragging:
position = get_global_mouse_position() - of
func _on_button_button_down():
dragging = true
of = get_global_mouse_position() - global_position
func _on_button_button_up():
dragging = false
(also, im sure i could figure this out on my own real quick, but does anyone know off hand how to make the function where if you spin your mouse wheel, an object will rotate? thanks
if no one knows it off hand thats okay though ill find it ^^)