Fix border overlap

This commit is contained in:
MeowcaTheoRange 2024-12-06 22:22:44 -06:00
parent a4fbfeaddb
commit cc5e8eb66c

View file

@ -42,7 +42,7 @@ var fuck_you_godot_signals = 0
func _ready() -> void:
var frame:ReferenceRect = region_viewport.get_node("ReferenceRect")
region_viewport.size_changed.connect(func():
frame.position = (region_viewport.size / 2) - Vector2i(frame.size / 2)
frame.position = ((region_viewport.size / 2) - Vector2i(frame.size / 2)) - Vector2i.ONE
)
link_range_to_callable(frame_count, func(val: int):
@ -467,13 +467,13 @@ func set_region_view() -> void:
rg_oskin_next_char.position = next_frame.frame_pos
rg_oskin_next_char.texture.region = Rect2(next_frame.pos, next_frame.size)
character.position = cur_frame.frame_pos
character.position = Vector2i(cur_frame.frame_pos) + Vector2i.ONE
character_frame.position = cur_frame.frame_pos
character_frame.size = cur_frame.size
character_frame.size = Vector2i(cur_frame.size) + Vector2i(2,2)
atlas.region = Rect2(cur_frame.pos, cur_frame.size)
frame.size = spritesheet_size
frame.position = (region_viewport.size / 2) - Vector2i(frame.size / 2)
frame.size = spritesheet_size + Vector2i(2,2)
frame.position = ((region_viewport.size / 2) - Vector2i(frame.size / 2)) - Vector2i.ONE
var ts_dont_change_internal = false
func set_three_stooges() -> void:
@ -488,7 +488,7 @@ func set_three_stooges() -> void:
set_vector(region_pos, atlas.region.position)
set_vector(region_size, atlas.region.size)
set_vector(sprite_offset, character.position)
set_vector(sprite_offset, character.position - Vector2.ONE)
ts_dont_change_internal = false