Anteworld - Outerra Game > JavaScript development
find_object arguments
(1/1)
zzz:
In the world interface, what are the purposes and arguments of find_object, find_object2, find_object_mesh, and find_object_point?
Putting in random values returns me the ECEF positions of objects when the camera is within their bounding box. Was wondering if I could use it to get the positions of all objects in a scene.
cameni:
These take parameters that define a single ray, and return the object hit by it. Getting the positions of all objects would be likely too expensive, but sometimes it is used, for example for line-of-sight computation. Usually you'd spread it over several frames though.
SteelRat:
--- Quote from: cameni on September 20, 2016, 02:35:06 pm ---These take parameters that define a single ray, and return the object hit by it. Getting the positions of all objects would be likely too expensive, but sometimes it is used, for example for line-of-sight computation. Usually you'd spread it over several frames though.
--- End quote ---
--- Code: ---$world.nearest_objects(pos/*ECEF*/, radius/*radius of the sphere within which a search will be*/)
--- End code ---
?
alternatively an easier solution.
Navigation
[0] Message Index
Go to full version