0 votes

Hi,

I have 2 questions about collision objects.
I didn't find the decisive answer in the documentation.

1.) Shape type
class: CollisionObject2D
function: get_shape

If I have a RigidBody2D (with custom CollisionPolygon2D), then the get_shape(shape_idx) function will return ConvexPolygonShape2D instance always?
Or it can also return any other ***Shape2D types (as I see the function's signature allows it)?

2.) Shape points order
class: ConvexPolygonShape2D
function: set_points

The documentation says:

"Set a list of points in either clockwise or counter clockwise order,
forming a convex polygon."

Is this true? It only works for me, when the order is CW.
Maybe I screwed up something :D?

in Engine by (674 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 Frequently asked questions and 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.