Horde3D
http://horde3d.org/forums/

Picking doesn't work on non transofrmed objects
http://horde3d.org/forums/viewtopic.php?f=3&t=556
Page 1 of 1

Author:  DiThi [ 14.11.2008, 23:44 ]
Post subject:  Picking doesn't work on non transofrmed objects

I've been several hours trying to understand why this always returned zero:
Code:
printf("%i\n",Horde3DUtils::pickNode(cam,event.button.x/float(width),1-(event.button.y/float(height))));

I finally came up with the problem: it only works when it has been transformed at least once:
Code:
Horde3D::setNodeTransform(model, 0,0,0, 0,0,0, 1,1,1);

Author:  Volker [ 15.11.2008, 09:53 ]
Post subject:  Re: Picking doesn't work on non transofrmed objects

I couldn't reproduce this problem. I changed the Knight Demo based on the picking example in the wiki. Then I removed the setNodeTransform calls from the knight and the sphere and picking still works as expected.

Could you provide a little bit more information about your scenario where the picking fails?

Author:  DiThi [ 15.11.2008, 16:23 ]
Post subject:  Re: Picking doesn't work on non transofrmed objects

Volker wrote:
I couldn't reproduce this problem. I changed the Knight Demo based on the picking example in the wiki. Then I removed the setNodeTransform calls from the knight and the sphere and picking still works as expected.


Try also quitting setModelAnimParams

Author:  Volker [ 15.11.2008, 16:53 ]
Post subject:  Re: Picking doesn't work on non transofrmed objects

I had done this already. I also removed the setupModelAnimStage calls. And it still works for both the sphere and the knight. The only thing that will be transformed now is the camera. But I cant remove that transformation because then I don't have something to pick anymore :-)

Could you try to debug into the pickNode Code within your application, to check the values of the transformations when your picking is not working?

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/