神経をモデルにしたマインドマップは作れるか?

神経をモデルにしたマインドマップのアプリが欲しい。

すでにあるか?

それらしいものはある。

欲しい機能がないので作る。

UnityでSphereを二つ作り、繋げてみる。

SphereをLineでConnect

Line Rendererを使ってみる

Unity ManualどうりCreate Empty,Line Renderer,Material

Unity のメニューバーで GameObject > Create Empty を選択します。 Unity のメニューバーで Component > Effects > Line Renderer を選択します。 Line Renderer にテクスチャかマテリアルをドラッグします。Material でパーティクルシェーダーを使用している場合に最適です。

Unity Manual

Line RendererのPositionを変更。

自動でPositionの値を変更するには?

LineRenderer.SetPositionsを使ってみる

This method is preferred to SetPosition when setting all positions, as it is more efficient to set all positions using a single command than to set each position individually. Note that positionCount must be called before SetPositions. Also SetPositions ignores points with indices beyond positionCount.

Unity Scripting API

SetPositionよりも複数のpositionを変更するのに使用。

positionCountをSetPositions前に使用。

positionCountを超えるものは無視される。

今日はここまで 2020年4月28日

コメントを残す