Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: find_object arguments  (Read 9278 times)

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
find_object arguments
« on: September 19, 2016, 06:55:18 pm »

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.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: find_object arguments
« Reply #1 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.
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: find_object arguments
« Reply #2 on: September 20, 2016, 05:49:23 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.

Code: [Select]
$world.nearest_objects(pos/*ECEF*/, radius/*radius of the sphere within which a search will be*/)
?

alternatively an easier solution.
Logged