The collision shape detects Player collishion only when is facing left.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SatinOregano503

showcase video:
Godot_problem - Album on Imgur

My problem is, I think simple. If the enemy facing left it detects player but if facing right it’s not. What’s the case?

Hitbox/CollishionShape is the area of the enemy, when area entered by player play animation attack.

if direction == 1:
		$Sprite.flip_h = false
		$Sprite/Sprite2.flip_h = false
		$Sprite/Sprite2.position.x = 50 
		$HitBox/CollisionShape2D.position.x = 376
	else:
		$Sprite.flip_h = true
		$Sprite/Sprite2.flip_h = true
		$Sprite/Sprite2.position.x = -50
		$HitBox/CollisionShape2D.position.x = 156
:bust_in_silhouette: Reply From: afk27111

Hmm… I’m a beginner, but I found out about this good website that can tell you more about areas, I mean that website worked for me.
Link - https://kidscancode.org/godot_recipes/g101/3d/101_3d_04/

Thanks for comment, i will look at this too.

SatinOregano503 | 2021-02-04 18:01

:bust_in_silhouette: Reply From: SatinOregano503

Hi! I already found a solution. Hitbox/CollishionShape was detecting Player’s body but animation was blocking itself on the right side. I added a variable named blocked_anim and set it to false. I play animation only when its false, it worked. Animation is playing on the right side and left. Sometimes random idea’s are the best!