0 votes

I have a Polygon2D with a Skeleton2D attached. This works beautifully. I can check whether I clicked on it by using

var myPolygonClicked = 
Geometry.is_point_in_polygon(MyPolygon2D.get_local_mouse_position(), MyPolygon2D.polygon)

This code doesn't see the Polygon2D being morphed by the Skeleton2D however.

Looking at the source code I noticed the skinning happens on the GPU. I can also see feedback buffers are used, just like the Particle system. Only there seems no way to access it from GDScript. The Particle system only seems to use Feedback Buffers for memoization, so the particle parameters doesn't get reset every frame. Trying to patch in the feedback buffers back to the Polygon2D by changing the Godot source seems too much.

Is there a way to get the transformed vertices from a Polygon2D?
What alternatives are there to have pixel perfect mouse picking on Skeletonized Polygon2Ds?

Godot version 3.3.4-stable
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.