How to make a simple colored rect with physics?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bert

How do I create a simple colored rectangle with physics?

I don’t think that using a sprite makes sense here, since I need just one color. I am using a StaticBody2D which has a rectangular CollisionShape2D attached to it. Can I just color the CollisionShape2D somehow?

Thank you!

:bust_in_silhouette: Reply From: kidscancode

You can use a Polygon2D if you just need a solid-colored rectangle.

That works just perfect. Thank you!

Bert | 2019-04-09 14:51