Godot Version
4.3.stable
Question
OK, so I have two circle collision shapes with the bullets and enemy’s.
when both are going in the same some what direction, they start to only collide as if only head on collisions count.
example:
So in this screen shot everything is moving to the right with some very slight differences, I am actively moving the player to chase the enemy and firing multiple bullets, when the bullets hit they act as intended bouncing off the enemy as they should but the enemy does not veer off course at all as if in the 180 degree section I have drawn all collision are not registered or are ignored.
Bullet code:
func _physics_process(delta):
var collision: KinematicCollision2D = move_and_collide(velocity * delta)
if collision:
var reflect = collision.get_remainder().bounce(collision.get_normal())
velocity = velocity.bounce(collision.get_normal())
move_and_collide(reflect)
counter += 1
Enemy code:
func _ready():
velocity = Vector2(speed, 0).rotated(angle_to_taget)
func _physics_process(delta):
var collision: KinematicCollision2D = move_and_collide(velocity * delta)
if collision:
var reflect = collision.get_remainder().bounce(collision.get_normal())
velocity = velocity.bounce(collision.get_normal())
move_and_collide(reflect)
this to me makes sense, and it works up until this one interaction of moving the same direction, if anyone could give any advice as to why the collision does not take place or a method that does allow for this type of collision.
thank you for your time in reading this.