TokisanGames/Terrain3D

Two interesting features

JekSun97 opened this issue · 2 comments

Description

It would be useful to be able to use all the editor's brushes in real time through code, this is useful for simulators where we edit the terrain, this would give the ability to create explosions in the landscape, or paint with a texture for the same explosion, perhaps this already exists?

It would also be convenient to have a function for obtaining texture by vector or normal, for example, shooting a beam across the landscape and recognizing what material we are standing on and making appropriate sounds when we walk.

Please review the API and search issues before making tickets. And one ticket per request.

  • The API can already return the materials at a certain point (base, overlay, blend, up to you to interpret based on your blend settings) with storage.get_texture_id. But see #283
  • The normal can already be returned with storage.get_normal
  • This terrain is not designed for realtime destructability. For that use Zylann's voxel tools. However for an experienced programmer it can be edited. The editor is a GDScript "game" running in Godot and it edits the terrain using the API with the brushes. None of that is removed during runtime, so you can do it too. Start reading at editor.gd and the API.

Thanks, I'll definitely try it about the dynamic change.
But if the process of this action is complicated, for those who have recently been familiar with Godot, it was still useful to have such functions :)