Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 18:24

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 14.11.2008, 23:44 
Offline

Joined: 26.10.2008, 03:19
Posts: 6
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);


Top
 Profile  
Reply with quote  
PostPosted: 15.11.2008, 09:53 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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?


Top
 Profile  
Reply with quote  
PostPosted: 15.11.2008, 16:23 
Offline

Joined: 26.10.2008, 03:19
Posts: 6
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


Top
 Profile  
Reply with quote  
PostPosted: 15.11.2008, 16:53 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group