Anteworld - Outerra Game > Modding: Importer, Tools & Utilities

getting info on terrain material from world position

(1/2) > >>

fly77:
Is there a way to access from within a javascript the material of the terrain at a given latitude , longitude  ? I know it is possible inside vehicle scripts interrogating the wheel_data    material property. However this only tests the material at the location where the wheel stands and to know material property at another location I need to drive there. Instead I would like to know the material property of the terrain just by giving world position coordinates. Is there any way ?

cameni:
There are some internal APIs for that, but generally the query results can be arbitrarily imprecise or flat wrong if there's no observer at or near the queried location, that would cause the measurement to be more precise.

You know, quantum uncertainty and all that :)

fly77:
Is it possible for us to access/use these"internal" apis? In case where can i find them?

cameni:
It's possible, but it's undocumented because we don't want to support that mode of access for mods, but rather to make some kind of a sensor API that can be better controlled and used in future game/sim modes.

What's the intended use for it?

fly77:
I was thinking about a way to place my streetlamps automatically along roads by spawning a single "vehicle" in some place which then probes the terrain around to place multiple streetlamp meshes along roads nearby so that all can be lit by spawning a single instance of streetlamp

Navigation

[0] Message Index

[#] Next page

Go to full version