hello all,
i have a beginner question :
i have a robot
which i m setting on (0,1.45,0) and then i m moving it like this:
public boolean moveBy(double x, double z)
/* Move the sprite by offsets x and z, but only if within the floor
and there is no obstacle nearby. */
{
if (isActive()) {
Point3d nextLoc = tryMove(new Vector3d(x, 0, z));
if (obs.nearObstacle(nextLoc, radius*OBS_FACTOR))
return false;
else {
doMove( new Vector3d(x, 0, z) ); // inefficient recalc
return true;
}
}
else // not active
return false;
} // end of moveBy()
Accessing TG for that robot, return me always 0 at y axis (x,0,y)
public TransformGroup getTG()
{
return objectTG;
}
but i want the same value, when i get that TG after applying movement on this robot as shown
like(x,1.45,y)
so what i can do before return TG or where that y value which i set as initial for y why it’s returning y=0.
i want “y” the always same return which i set initially; irrespective of the x and z of TG.
thanks,
Jibbylala