mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-10-31 00:48:47 +08:00 
			
		
		
		
	Fix hitbox circle on flip (#1165)
This commit is contained in:
		| @ -39,13 +39,12 @@ class MyCollidable extends PositionComponent | ||||
|           position: position, | ||||
|           size: Vector2.all(100), | ||||
|           anchor: Anchor.center, | ||||
|         ) { | ||||
|     addHitbox(HitboxCircle()); | ||||
|   } | ||||
|         ); | ||||
|  | ||||
|   @override | ||||
|   Future<void> onLoad() async { | ||||
|     await super.onLoad(); | ||||
|     addHitbox(HitboxCircle()); | ||||
|     final center = gameRef.size / 2; | ||||
|     velocity = (center - position)..scaleTo(150); | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Lukas Klingsbo
					Lukas Klingsbo