Skip to content

folt-a/tilemap_to_navigation2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Tilemap to Navigation2d

version:Godot 4.0 beta 2 Addon.

OS: Windows, Linux

Create a Navigation2DRegion from the tiles painted on the TileMap node on the scene.

Godotのアドオンです。

シーン上のTileMapノードに塗ったタイルから、Navigation2DRegionを作成します。

Faultun-1490619614593941506-20220207_183305-vid1.mp4

This movie is 3.5 but same


English

In the scene view, when the TileMap node is selected, the commands are added at the bottom of the inspector.

image


Setting 1

image


Setting 2

image

Select "hole" in the generated NavigationRegion2D navpoly's polygon.


Setting 3

image

If there is already a node named "NavigationRegion2D", choose whether to overwrite it or add a new node without deleting it.

If you do not overwrite it, it will be added with a node name like "@NavigationRegion2D@24847".


Setting 4

image

Creates a margin from the wall. Specify the number of pixels.

This can be used when you want people to walk along the navigation, but do not want them to walk along the edge of the wall.

example 32 pixel tileset

gap 1 pixel

image

gap 4 pixel

image

gap 15 pixel

image


日本語

シーンで、TileMapノードを選択したときのインスペクタの一番下にこのような項目が追加されます。

image


1つ目の設定

image

選択しているTileMapノードのみを対象とするか、現在のシーンに存在するすべてのTileMapノードを対象とするか選択します。


2つ目の設定

image

生成されるNavigationRegion2Dのnavpolyのポリゴンの「穴」とするタイルを選択します。


3つ目の設定

image

すでに「NavigationRegion2D」という名前のノードがある場合に、上書きするか消さずに新規追加するか選択します。

消さない場合は「@NavigationRegion2D@24847」みたいな感じのノード名で追加されます。


4つ目の設定

image

壁から余白を作ります。ピクセル数を指定します。

ナビゲーションに沿って歩いてほしいが、壁きわきわに歩いてほしくないときに使えます。

32pixelタイルでの例

余白1pixel

image

余白4pixel

image

余白15pixel

image


GDExtensionのコードはこちら

(このアドオンにビルド済みのバイナリが含まれているので使う必要はありません)

https://github.com/folt-a/gdextension_clipper_singleton

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published