PDA

View Full Version : How to calculate distance


mt_sabao
03-29-2003, 12:26 AM
How´s it going folks?
Anyone knows a way to determine a distance between to objects using xpresso?
Thanks in advance

Per-Anders
03-29-2003, 12:38 AM
use the distance node New node->Xpresso->Calculate->Distance

and if you need the math in future it's the simple and well known equation of the hypotenues is equal to the square root of the adjacent of the squared plus the opposite of the squared, which in 3d space comes out to:

distance=|((x*x)+(y*y)+(z*z))|

mt_sabao
03-29-2003, 12:49 AM
sadie, first thanks for the reply.

I´ve put two cubes in my scene, connect their positions in the inputs of the distance node. But how do i obtain the output, the distance?

Per-Anders
03-29-2003, 12:53 AM
from the output port of the distance node. it's probably best if you start by going through a few of the tutorials that come with cinema first as there are a few on xpresso, this will ground you with how node based expression systems work and should get you up and running in no time.

mt_sabao
03-29-2003, 12:57 AM
thanks, in the meantime figured it out. I connected a result node to the output of the distance node (duh). It makes sense... :D

JIII
03-29-2003, 12:58 AM
use a result or spy node. but sadie is right.

this is all covered in the manual(I knew it and I am an xpresso dunce).

read da manual Cinema isn't a toaster, the manual is important.

CGTalk Moderation
01-14-2006, 06:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.