My scene tree looks like:
Character (RigidBody2D)
-> CollisionShape2D
-> MeleeHitbox (Area2D)
-> CollisionShape2D
In my main scene's "_process" function, I call character.linear_velocity = <non-zero Vector2>
to make my characters move. When the MeleeHitbox is added to my Character scene, the characters will not move. When I remove it, they move perfectly as I'd expect.
Any ideas what's going on here?
I've tried disabling all collision layers/masks on the MeleeHitbox. I've tried moving the MeleeHitbox CollisionShape2D so it doesn't overlap my RigidBody2D's CollisionShape2D. I've tried:
func _integrate_forces(state):
state.set_linear_velocity(cur_velocity)
on my RigidBody2D instead of using self.linear_velocity
. I've tried using apply_central_impulse()
instead of self.linear_velocity
. I've tried setting the linear_damp field on the MeleeHitbox to 0. None of these experiments had any effect; the only thing that works is if I remove the MeleeHitbox entirely.