0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

UnrealForCesiumでCartographicPolygonの位置を固定する

Posted at

以下の記事にあるようにCartographicPolygonを使って指定領域を非表示にしようとした場合に、緯度・経度を変更するとCartographicPolygonは追随して同じ領域を非表示にします(東京タワーを非表示にすると緯度・経度を変えてもCartographicPolygonは自動で移動して東京タワー部分が非表示にされたまま)。
このため、そのままだとUnrealEngineの同じ空間上にCartographicPolygonを表示し続けることができません(リンク先の用にUnrealEngineのレベル上で円を用意してその中に地形表示するような場合、緯度・経度が変わると非表示領域がずれる)。
これを無理やり固定できたのでその方法をメモしておきます。

試した環境

UE5.3.2
CesiumForUnrealプラグイン2.3.0

やったこと

CesiumCartographicPolygonを継承したクラスのBeginPlayで以下のようにGeoreferenceのOnGeoreferenceUpdatedイベントにバインドして強制的に位置を戻してしまえば良いようです。

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?