gedimaster
04-10-2005 03:36:12
hi,
i have 2 questions regarding terrain height queries:
a. i'm doing this for the ray - Ray pickRay(dSceneMgr->getSceneNode("myNode")->getPosition(), Vector3::UNIT_Y);
does it mean that even no matter how my object is oriented, the ray is always cast from its position and then vertically down? or is the UNIT_Y wrt to its local axis?
b. i'm using the following to calculate height above terrain:
i see that the iterator it has a method it->dist but it always return 0. what value does it represent?
thanks.
i have 2 questions regarding terrain height queries:
a. i'm doing this for the ray - Ray pickRay(dSceneMgr->getSceneNode("myNode")->getPosition(), Vector3::UNIT_Y);
does it mean that even no matter how my object is oriented, the ray is always cast from its position and then vertically down? or is the UNIT_Y wrt to its local axis?
b. i'm using the following to calculate height above terrain:
Vector3 pos = it->worldFragment->singleIntersection;
Vector3 line = pos-dSceneMgr->getSceneNode("acNode")->getPosition();
Real distance = sqrt(line[0]*line[0]+line[1]*line[1]+line[2]*line[2]);
i see that the iterator it has a method it->dist but it always return 0. what value does it represent?
thanks.