All Questions

Community

G
Aditya Gupta

Player not killed

I am using Godot 3.2. Whenever the enemy touches my player, it gets killed but the player is still alive. Also, the debugger shows the following error: body_set_shape_disabled: can't change the state while flushing queries. Use call_deferred() or set_deferred() to change the monitoring state instead. When I pushed the stomp_detector's collision shape area a little back, the enemy touches player but it doesn't kill it. Is this an engine related problem?
  • G
    Aditya Gupta

    I fixed it by reshaping the collisionshape2D on both player and enemy.

  • G
    Aditya Gupta

    I fixed the error by replacing:get_node("CollisionShape2D").disabled = true

    with:

    call_deferred("set",get_node("CollisionShape2D").disabled,true)


    but the player is still not getting killed when it touches the enemy (below stomp area).