• 3 Posts
  • 60 Comments
Joined 2 years ago
cake
Cake day: June 29th, 2024

help-circle
  • You could have your Drag Box use the Area2D class and listen for it’s events like this: (input_pickable need to be set to true)

    class_name DraggableBox
    extend Area2D
    
    var mouse_inside: bool = false
    
    func _ready():
      mouse_entered.connect(_on_mouse_entered)
      mouse_exited.connect(_on_mouse_exited)
    
    func _process(delta: float):
      if (not mouse_inside): reuturn
      if (Input.is_action_pressed("name_for_action_with_mouse_click"):
        #handle your object movement
      if (Input.is_action_just_released("name_for_action_with_mouse_click"):
        #handle letting go of the object
    
    func _on_mouse_entered():
      mouse_inside = true
    
    func _on_mouse_exited():
      mouse_inside = false
    



  • JaN0h4ck@feddit.orgtome_irl@lemmy.worldme_irl
    link
    fedilink
    arrow-up
    69
    arrow-down
    8
    ·
    3 months ago

    Please put an NSFW tag on this. I was on the train and when I saw this I had to start furiously masterbating. Everyone else gave me strange looks and were saying things like “what the fuck” and “call the police”. I dropped my phone and everyone around me saw this image. Now there is a whole train of men masterbating together at this one image. This is all your fault, you could have prevented this if you had just tagged this post NSFW.