0 votes
     func render_content_inventory():
        for slot in slots:
            if (Inventory.get_data(slot.index)):
                var kinematic_body = KinematicBody2D.new()
                var collision = render_collision_shape(
                    {'x': 0 - style.width_2 * 0.8 / 2, 'y': 0},
                    {'width': style.width_2 * 0.8, 'height': style.height_4 * 0.8}
            if $window_inventory.get_node('kinematic_item_slot_'+str(slot.index)):

func on_input_event(viewport, event, shape_idx):
    print('hover in')
    if event is InputEventMouseButton:
        if event.button_index == BUTTON_LEFT and event.pressed:
        elif event.button_index == BUTTON_LEFT and !event.pressed:
    elif event is InputEventScreenTouch:
        if event.pressed and event.get_index() == 0:
            self.position = event.get_position()


its only trigger when I hover outside PopupDialog

Godot version v3.2.3.stable.official
in Engine by (12 points)

Your KinematicBody2D has a collisionobject2d (the blue thing), right? I'm not sure what's going on exactly, but it needs to collide with another CollisionObject2d for an event to trigger or physics to simulate. And from what I see in the image, there is no 2nd CollisionObject2d to collide with.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.