From dc577acc8d812ca8ceb09c563e7c22f0cb5ed7ae Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 21 May 2024 12:48:30 +0200 Subject: [PATCH] [godot] Take clipping into account in Skeleton.get_bounds() --- spine-godot/spine_godot/SpineSkeleton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spine-godot/spine_godot/SpineSkeleton.cpp b/spine-godot/spine_godot/SpineSkeleton.cpp index a25b4aea4..cf709b930 100644 --- a/spine-godot/spine_godot/SpineSkeleton.cpp +++ b/spine-godot/spine_godot/SpineSkeleton.cpp @@ -30,6 +30,7 @@ #include "SpineSkeleton.h" #include "SpineCommon.h" #include "SpineSprite.h" +#include void SpineSkeleton::_bind_methods() { ClassDB::bind_method(D_METHOD("update_world_transform", "physics"), &SpineSkeleton::update_world_transform); @@ -222,7 +223,8 @@ Ref SpineSkeleton::find_physics_constraint(const String Rect2 SpineSkeleton::get_bounds() { SPINE_CHECK(skeleton, Rect2(0, 0, 0, 0)) float x, y, w, h; - skeleton->getBounds(x, y, w, h, bounds_vertex_buffer); + spine::SkeletonClipping clipper; + skeleton->getBounds(x, y, w, h, bounds_vertex_buffer, &clipper); return Rect2(x, y, w, h); }