article thumbnail

Question about PolygonCollider2D

Cocos

In the editor, when you add a PolygonCollider2D to a sprite with a transparent area, the polygon is automatically created. How can I get automatic polygon creation when creating a sprite dynamically in the script code? I will be grateful for your help!

Polygon 40
article thumbnail

How to programmatically access to assets when in `executeInEditMode`

Cocos

I’m trying to write a script to import assets from DLtk export and I need some advice. the idea is to use a data.json as entry point and parse it to build different nodes with attached images and polygon colliders so that the user can add its own script to every layer. You already do a similar thing with Tiled tile maps.

Asset 52
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Maintenance release: Godot 3.3.1

Mircosoft Game Dev

Batching: Fix light pass modulate , a potential crash, polygon rotation from vertex shader, and 2D skinning with unrigged polygons ( GH-48151 , GH-48125 , GH-48457 , GH-48647 )). Core: Expose Shape.get_debug_mesh() to the scripting API ( GH-48316 ). Here are some of the main changes since 3.3-stable:

Polygon 52
article thumbnail

Release candidate: Godot 3.3.1 RC 2

Mircosoft Game Dev

Batching: Fix light pass modulate , a potential crash, polygon rotation from vertex shader, and 2D skinning with unrigged polygons ( GH-48151 , GH-48125 , GH-48457 , GH-48647 )). Core: Expose Shape.get_debug_mesh() to the scripting API ( GH-48316 ). Here are some of the main changes since 3.3-stable:

Polygon 52
article thumbnail

Godot 1.1 beta1 is out!

Mircosoft Game Dev

Supports a lot of scenarios and perform smart-completion of node types if a scene where the script is being used is open. 2D Shadows with Polygonal Occluders. New 2D Navigation Polygon support, for efficient 2D pathfinding. Navigation Polygons can be edited visually and combined, disabled, etc. 2D Materials.

Polygon 52
article thumbnail

Release candidate: Godot 3.3.1 RC 1

Mircosoft Game Dev

Batching: Fix light pass modulate , a potential crash, and polygon rotation from vertex shader ( GH-48151 , GH-48125 , GH-48457 )). Core: Expose Shape.get_debug_mesh() to the scripting API ( GH-48316 ). LSP: Update the filesystem for changed scripts, fixes issues with new named classes ( GH-47891 ).

Bug 52
article thumbnail

Godot 1.1 is out!

Mircosoft Game Dev

Supports a lot of scenarios and perform smart-completion of node types if a scene where the script is being used is open. 2D Shadows with Polygonal Occluders. New 2D Navigation Polygon support, for efficient 2D pathfinding. Navigation Polygons can be edited visually and combined, disabled, etc. 2D Materials.

Polygon 52