Page 1 of 1

How to determine that we arrive the desired position?

Posted: Thu Apr 15, 2010 03:58
by songge3604
This maybe a simple problem:

How to determine that the moving window arrive the desired position?

for example: pos(x, y, z) moving to desired_pos(x', y', z')

I can not find a good method, can you help me, please.

Re: How to determine that we arrive the desired position?

Posted: Thu Apr 15, 2010 09:03
by CrazyEddie
Firstly, there is no 'z' component. Aside from this, how are you moving the window?

Rejecting the base case of 'since you're setting the position you should already know when it's reached a certain point', and assuming that perhaps you're wanting pixel only positions, you can probably use CEGUI::Window::getUnclippedOuterRect or some such thing and compare with the target position.

CE.