0 votes

In my game the character punches and kicks so I want to implement a hitbox that can turn on and off with animation. Therefore, I created an Area2D (with CollisionShape2D) and set about animating the "monitoring" parameter with an AnimationPlayer. However, it creates this error:

E 0:00:04:0619   Condition ' !area_in && !E ' is true.
  <C Source>     scene/2d/area_2d.cpp:264 @ _area_inout()

Next I tried setting the AnimationPlayer Process to Physics and I added a Function track and used calldeferred(setmonitoring, True), but neither of these steps fixed the bug.

I can think of script that would help make this work (essentially, capturing Area2D enters and exits, but being selective about when to pass them on). But what I would like to know is if there is a way to do this without an additional script? How can I animate the relevant Area2D properties without causing the error?

in Engine by (116 points)

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.