import-bot (20211) [Avatar] Offline
#1
[Originally posted by siu98oad]

How do I 'extract' the coordinates of a live scene?

My program works correctly - it loads in a scene. When the scene is live, I
need access to the coordinates of the scene. How do I achieve this?

Uzo
import-bot (20211) [Avatar] Offline
#2
Re: Coordinates of a live scene
[Originally posted by author]

An object's coordinates are always expressed relative to some space. The two
most common spaces are the world space, which is the same for all objects, and
the local space, which is defined by the collection of transforms "over" the
object. To do anything useful with objects you need to convert coordinates
between local and world space. For example, picking takes place in world
coordinates, but the world relative hit point on the object can be converted
into coordinates relative to the object to be more useful (e.g. which part of
the object was hit).

To do coordinate conversions (i.e. spatial transforms) you need to use the
getLocalToVworld method of the Node class. However, in order to use this
method you have to set the appropriate capability bit on the nodes involved.

Take a look at section 13.1 in the book. in particular, look at section
13.1.3 for details about using LocalToVworld. The section after it explains
the inverse (vworld to local) transform, and the section after that one
explains how to convert from one local space to another (e.g. view space to
object space).

good luck
--jon

> How do I 'extract' the coordinates of a live scene?
>
> My program works correctly - it loads in a scene. When the scene is live, I
> need access to the coordinates of the scene. How do I achieve this?
>
> Uzo