0 votes

hi there,

the title sums it up; I am trying to flip a CollisionPolygon2D so that, when my player node moves left and right, the collision flips along with the sprite. There is no method or property that seems to accomplish it, and I can't seem to reshape the node either, so I am at a loss. If there is any information I can provide, I will be happy to.


in Engine by (17 points)

1 Answer

+1 vote
Best answer

You could simply turn the scale value to -1 in the x axis. This will effectively flip it.

polygon_to_be_flipped.scale.x = -1
by (1,848 points)
selected by

Excellent, thanks.

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.