1612
« on: August 26, 2008, 10:30:17 pm »
I guess I misunderstood the documentation, because it says it will assume z to be 1. And the hero should move on the x and z planes. So I figured the z value would instead be placed on the y coordinate (some orientation problem someone with more spacial perception than I would understand!). But you're right, of course, about the delta. It should be calculated on the call to transform (between destination and hero.getTransformedCenter()). The following still doesn't work:
SimpleVector heroCenter3D = hero.getTransformedCenter();
SimpleVector destination = Interact2D.reproject2D3D(theCamera, buffer, mousePoint.x, mousePoint.y);
hero.translate(destination.x-heroCenter3D.x, destination.y-heroCenter3D.y, destination.z-heroCenter3D.z);
Note that the hero shouldn't even move in the y axis anyway, but I suppose I would just change the y and z values later (after I at least saw the hero appearing to be in the right place).