Hi there! I am trying to make a top-down shoot-em-up and I noticed that, without fail, one of my enemies seems to always stop right before the player and not collide (they are meant to do damage upon collision).
Other enemies of the same scene will behave normally, but it seems that if I stop moving, this bug occurs.
I am going to attach a screenshot, gif, and some attributes of the Navigation Agent on the enemy scene if it is helpful. What am I doing wrong here? Any assistance is appreciated. Thank you!
EDIT: Seems to only occur when the player is facing away from the enemy?
Is it possible that Navigation is getting your things from Point A to approximately Point B, so the enemies might sometimes stop right before collision?
Edit: easy fix/test could be to just navigate normally when far away, but mindlessly move forward when close.
WOW - I actually think I solved this by discovering it had nothing to do with the navigation agent
So I use an Area3D node to detect if the object has gotten close enough to the player (the enemies are supposed to be like “drones” that get too close and explode). However, they do have a collision boundary and shape for detecting getting hit by the lasers the player can shoot.
The collision boundary for the projectiles was larger than the Area3D node detecting the player.
Also, I noticed that somehow my scale had become slightly off in the root of the player, so that might has caused some odd behavior along the capsule collision shape of the player?
I probably did this to myself cause I wanted a Character3D body for the enemy, but didn’t want to use the collision to cause damage to the player, just the Area3D node.
I cannot seem to reproduce the issue after making those changes, and I confirmed making the enemy collision shape (meant for the lasers) significantly larger than the Area3D node prevents the behavior I wanted. I think this is good to go now, but still thanks for offering help!
This is what the enemy hierarchy looks like, FWIW: