Closed drbloop closed 5 months ago
I was able to get around this issue by manually editing the Character tscn file in a text editor. It looks like the InteractionPolygon array of points is declared twice in the file, and unless you edit them both to be the correct value, the InteractionPolygon defaults to the small square.
[node name="CharacterSabrina" type="Area2D"]
priority = 1
script = ExtResource("1_fq3jt")
text_color = Color(0.47451, 0.227451, 0.501961, 1)
can_move = false
popochiu_placeholder = null
script_name = "Sabrina"
description = "Sabrina"
walk_to_point = Vector2(-58, 57)
cursor = 8
interaction_polygon = PackedVector2Array(-19, -65, 26, -65, 22, 15, -17, 16)
...
[node name="InteractionPolygon" type="CollisionPolygon2D" parent="."]
visible = false
polygon = PackedVector2Array(-19, -65, 26, -65, 22, 15, -17, 16)
...
Maybe there is a way to reference the InteractionPolygon in the Character node instead of duplicating it - then there would be a single source of truth.
Will be fixed with #163
Bug description
When importing a Character via Aseprite, the InteractionPolygon is reset to a default value. This causes the interaction area for a character to be the default small square in the middle of their sprite. This does not happen for other import types like Props in a Room.
I can see this happening by running
git diff
on the Character tscn after reloading Import or running the game and seeing the polygon coordinates have changed.Steps to reproduce
Steps to reproduce the behavior:
Expected vs observed behavior
I expected the InteractionPolygon would be what I set in the Character scene, but it is instead the small default square.
Environment information (please complete):
Additional context
I only noticed this when moving to new Aseprite import workflow for Characters, so maybe the problem is in the import code. Previous Characters created without Aseprite import have correct InteractionPolygon boxes in Rooms.